feat: add built-in duration type #5043
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: [pull_request] | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: "1.23" | |
- uses: actions/checkout@v4 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
args: --timeout=3m | |
working-directory: . | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
services: | |
postgres: | |
image: pgvector/pgvector:pg16 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: keel | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 8001:5432 | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: "1.23" | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 22.13 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9.12.3 | |
- uses: actions/checkout@v4 | |
- name: Install @teamkeel/functions-runtime deps | |
working-directory: ./packages/functions-runtime | |
run: pnpm install --frozen-lockfile --production | |
- name: Install @teamkeel/testing-runtime deps | |
working-directory: ./packages/testing-runtime | |
run: pnpm install --frozen-lockfile --production | |
- name: Install Go deps | |
run: go mod download | |
- name: Run tests | |
run: go test ./... | |
proto: | |
runs-on: ubuntu-latest | |
name: Proto check | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v17 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Run 'make proto' | |
run: make proto | |
- name: Error if there are any changes | |
run: | | |
if ! git diff --name-only --exit-code; then | |
echo '::error ::"Please run `make proto` locally and commit the changes"' | |
exit 1 | |
fi |