From 7de156ca261fadc73554931a07ae0c4b8f05911d Mon Sep 17 00:00:00 2001 From: Broderick Westrope Date: Mon, 19 Aug 2024 17:44:57 +1000 Subject: [PATCH] ci: finish GitHub Actions setup (#3) * ci: update test workflow * ci: extract lint workflow --- .github/workflows/lint.yaml | 26 ++++++++++++++++++++++++++ .github/workflows/test.yaml | 20 ++------------------ 2 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..bcec69f --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,26 @@ +name: Lint + +on: + pull_request: + push: + tags: + - v* + branches: + - main + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: 1.23.x + + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.60 + skip-cache: true diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6b8d715..e62ebf4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,8 +13,8 @@ jobs: name: Test strategy: matrix: - go: [1.22.x, 1.23.x] - os: [ubuntu-latest, macos-latest, windows-latest] + go: [ 1.22.x, 1.23.x ] + os: [ ubuntu-latest, macos-latest, windows-latest ] runs-on: ${{matrix.os}} steps: - name: Set up Go ${{matrix.go-version}} @@ -35,19 +35,3 @@ jobs: - name: Test run: go test -cover -count=1 -race ./... - lint: - name: Lint - strategy: - matrix: - go: [1.23.x] - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go }} - - name: golangci-lint - uses: golangci/golangci-lint-action@v6 - with: - version: v1.59