-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): simplify CI config (#164)
Build against two most recent stable golang releases, to match their release policy.
- Loading branch information
Showing
4 changed files
with
59 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: [main] # pushes TO main | ||
pull_request: | ||
branches: [main] # pull requests AGAINST main | ||
|
||
# cancel CI runs when a new commit is pushed to any branch except main | ||
concurrency: | ||
group: "test-${{ github.ref }}" | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
# build against the two latest releases, to match golang's release | ||
# policy: https://go.dev/doc/devel/release#policy | ||
go-version: | ||
- 'stable' | ||
- 'oldstable' | ||
|
||
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{matrix.go-version}} | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: test | ||
run: make testci | ||
|
||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: ./coverage.out | ||
if: ${{ matrix.go-version == 'stable' }} | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 'stable' | ||
|
||
- uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.