2023-07-27 16:47:18 +00:00
|
|
|
name: Tests and linters
|
2023-06-27 14:39:33 +00:00
|
|
|
on: [pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2023-10-23 15:05:03 +00:00
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v3
|
2023-06-27 14:39:33 +00:00
|
|
|
with:
|
2023-10-23 15:05:03 +00:00
|
|
|
go-version: '1.21'
|
|
|
|
cache: true
|
|
|
|
|
|
|
|
- name: Install linters
|
|
|
|
run: make lint-install
|
|
|
|
|
|
|
|
- name: Run linters
|
|
|
|
run: make lint
|
2023-06-27 14:39:33 +00:00
|
|
|
|
|
|
|
tests:
|
|
|
|
name: Tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-10-23 15:05:03 +00:00
|
|
|
go_versions: [ '1.20', '1.21' ]
|
2023-06-27 14:39:33 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: '${{ matrix.go_versions }}'
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: make test
|