Skip to content

Commit

Permalink
Simplify CI config (#28)
Browse files Browse the repository at this point in the history
Test against the two most recent stable golang versions, matching the
golang security policy.
  • Loading branch information
mccutchen authored Feb 6, 2024
1 parent 61135f8 commit e03a1cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
version: latest
26 changes: 5 additions & 21 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:

strategy:
matrix:
# build against the two latest releases, to match golang's release
# policy: https://go.dev/doc/devel/release#policy
go-version:
- '1.21'
- '1.20'
- '1.19'
- 'stable'
- 'oldstable'

steps:
- name: setup
Expand All @@ -32,28 +33,11 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: cache build
uses: actions/cache@v4
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-${{ matrix.go-version }}-build-${{ hashFiles('**/go.sum') }}

- name: cache mod
uses: actions/cache@v4
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-${{ matrix.go-version }}-mod-${{ hashFiles('**/go.sum') }}

- name: test
run: make testci

- name: report code coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage.out
if: ${{ matrix.go-version == '1.21' }}
if: ${{ matrix.go-version == 'stable' }}

0 comments on commit e03a1cf

Please sign in to comment.