From 6c2318486dceb6d98234a599bd025183541c3fbe Mon Sep 17 00:00:00 2001 From: Nathan <148575555+nathan-artie@users.noreply.github.com> Date: Thu, 3 Oct 2024 16:35:52 -0700 Subject: [PATCH] github: pin Ubuntu version to `24.04` (#507) Signed-off-by: Nathan <148575555+nathan-artie@users.noreply.github.com> --- .../workflows/{gha-go-test.yaml => go-checks.yaml} | 13 ++++++++++--- ...ntegration-tests.yaml => integration-tests.yaml} | 8 +++++--- 2 files changed, 15 insertions(+), 6 deletions(-) rename .github/workflows/{gha-go-test.yaml => go-checks.yaml} (89%) rename .github/workflows/{gha-integration-tests.yaml => integration-tests.yaml} (94%) diff --git a/.github/workflows/gha-go-test.yaml b/.github/workflows/go-checks.yaml similarity index 89% rename from .github/workflows/gha-go-test.yaml rename to .github/workflows/go-checks.yaml index e7752309..ae123511 100644 --- a/.github/workflows/gha-go-test.yaml +++ b/.github/workflows/go-checks.yaml @@ -1,20 +1,25 @@ -name: Go tests +name: Go checks on: [push] jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 + steps: - uses: actions/checkout@v4 + - name: Set up Go uses: actions/setup-go@v5 with: go-version: 1.23 - - name: Install dependencies + + - name: Download dependencies run: go mod download + - name: Run vet run: make vet + - name: Run staticcheck env: SC_VERSION: "2024.1.1" @@ -22,7 +27,9 @@ jobs: SC_URL="https://github.com/dominikh/go-tools/releases/download/$SC_VERSION/staticcheck_linux_amd64.tar.gz" wget -q ${SC_URL} -O - | tar -xzf - --strip-components 1 -C /usr/local/bin staticcheck/staticcheck make static + - name: Run tests + race condition check run: make race + - name: Check Go files are properly formatted run: test -z $(gofmt -l .) diff --git a/.github/workflows/gha-integration-tests.yaml b/.github/workflows/integration-tests.yaml similarity index 94% rename from .github/workflows/gha-integration-tests.yaml rename to .github/workflows/integration-tests.yaml index 0a90f145..b2d4999f 100644 --- a/.github/workflows/gha-integration-tests.yaml +++ b/.github/workflows/integration-tests.yaml @@ -4,7 +4,7 @@ on: [push] jobs: Postgres: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: golang:1.23 services: postgres: @@ -24,8 +24,9 @@ jobs: go-version: 1.23 - name: Run integration test run: PG_HOST=postgres make postgres-itest + MySQL: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: golang:1.23 services: mysql: @@ -45,8 +46,9 @@ jobs: go-version: 1.23 - name: Run integration test run: MYSQL_HOST=mysql make mysql-itest + MongoDB: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: golang:1.23 services: mongo: