Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: separate golangci-lint GHA (#3272)

Yilong Li509f10f580ec
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 4a45c75617..4fded09759 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -25,14 +25,8 @@ jobs:
run: pnpm lint
working-directory: frontend
- go-tests:
- strategy:
- matrix:
- release-tags:
- - "release,mysql"
- - "mysql"
+ golangci-lint:
runs-on: ubuntu-latest
- timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -44,7 +38,6 @@ jobs:
check-latest: true
cache: true
- name: Verify go.mod is tidy
- if: ${{ matrix.release-tags == 'mysql' }}
run: |
go mod tidy
git diff --exit-code
@@ -56,14 +49,41 @@ jobs:
./resources/mysql/*.tar.xz
key: ${{ runner.OS }}-build-mysql-cache
- name: Install dependencies
- run: go generate -tags ${{ matrix.release-tags }} ./...
+ run: go generate -tags mysql ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
- if: ${{ matrix.release-tags == 'mysql' }}
with:
version: v1.49.0
args: -v
skip-cache: true
+
+ go-tests:
+ strategy:
+ matrix:
+ release-tags:
+ - "release,mysql"
+ - "mysql"
+ runs-on: ubuntu-latest
+ timeout-minutes: 15
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-go@v3
+ with:
+ go-version: 1.19
+ check-latest: true
+ cache: true
+ - name: Cache MySQL
+ uses: actions/cache@v3
+ with:
+ path: |
+ ./resources/mysql/*.tar.gz
+ ./resources/mysql/*.tar.xz
+ key: ${{ runner.OS }}-build-mysql-cache
+ - name: Install dependencies
+ run: go generate -tags ${{ matrix.release-tags }} ./...
- name: Run all tests
run: go test -v ./... -tags=${{ matrix.release-tags }} -p=10 | tee test.log; exit ${PIPESTATUS[0]}
- name: Pretty print tests running time