Skip to content

chore(deps): update flanksource/gavel action to v0.0.52 - autoclosed #5515

chore(deps): update flanksource/gavel action to v0.0.52 - autoclosed

chore(deps): update flanksource/gavel action to v0.0.52 - autoclosed #5515

Workflow file for this run

on:
push:
branches:
- main
pull_request:
name: Test
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
postgres-version:
- { tag: "15", sha: "sha256:f57a3bdbf044f0b213fdc99f35a0d21c401608bf41f063176ec00c51df9655f7" }
- { tag: "16", sha: "sha256:47053cd4ee3f096afc744e53e3280de7b29b3670d2f2196c2acc0c6470923c99" }
- { tag: "17", sha: "sha256:0af65001d05296a2ead57ac4a6412433d8913d1bb5d0c88435a7d1e1ee5cb04b" }
services:
postgres:
image: postgres:${{ matrix.postgres-version.tag }}@${{ matrix.postgres-version.sha }}
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: test
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Install deps
uses: flanksource/deps@1e2d3aa46edc0971b3b3a15e3fb35ed252304aeb # v1.0.35
with:
tools: |
bun
uv
powershell
postgrest
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.26.x
cache: false # Using custom cache action below for .bin directory
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
.bin
key: cache-${{ hashFiles('**/go.sum') }}-${{ hashFiles('.bin/*') }}
restore-keys: |
cache-
- name: Test
run: make test
env:
DUTY_DB_URL: postgres://postgres:password@localhost:5432/test?sslmode=disable
DUTY_DB_CREATE: "false"
e2e:
runs-on: ubuntu-latest
services:
loki:
image: grafana/loki:3.5.1@sha256:3a4e80320df38087263e9d450fd812010ee57e1e0b0679465672c0e227441f43
ports:
- 3100:3100
options: >-
--health-cmd "wget --no-verbose --tries=1 --spider http://localhost:3100/ready || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.26.x
cache: false # Using custom cache action below for .bin directory
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
.bin
key: cache-${{ hashFiles('**/go.sum') }}-${{ hashFiles('.bin/*') }}
restore-keys: |
cache-
- name: E2E Test
run: |
make ginkgo
ginkgo -r tests/e2e/
env:
DUTY_DB_DISABLE_RLS: "true"
LOKI_URL: http://localhost:3100
e2e-blobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.26.x
cache: false
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
.bin
key: cache-${{ hashFiles('**/go.sum') }}-${{ hashFiles('.bin/*') }}
restore-keys: |
cache-
- name: E2E Blob Store Tests
run: make test-e2e-blobs
env:
DUTY_DB_DISABLE_RLS: "true"
migrate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
postgres-version:
- { tag: "15", sha: "sha256:f57a3bdbf044f0b213fdc99f35a0d21c401608bf41f063176ec00c51df9655f7" }
- { tag: "16", sha: "sha256:47053cd4ee3f096afc744e53e3280de7b29b3670d2f2196c2acc0c6470923c99" }
- { tag: "17", sha: "sha256:0af65001d05296a2ead57ac4a6412433d8913d1bb5d0c88435a7d1e1ee5cb04b" }
env:
migrate_command: >
make -B tidy hack/migrate/go.mod &&
cd hack/migrate &&
go build main.go && ./main --db-url 'postgres://postgres:postgres@localhost:5432/test?sslmode=disable'
steps:
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.26.x
cache: false # Using custom cache action below for .bin directory
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
.bin
key: cache-${{ hashFiles('**/go.sum') }}-${{ hashFiles('.bin/*') }}
restore-keys: |
cache-
- name: Check out main branch
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: main
- name: Apply base migrations
run: ${{ env.migrate_command }}
- name: Check out current branch
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Apply new migrations
run: ${{ env.migrate_command }}
services:
postgres:
image: postgres:${{ matrix.postgres-version.tag }}@${{ matrix.postgres-version.sha }}
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5