2023-05-31 13:06:00 +00:00
|
|
|
on: [pull_request]
|
2021-04-30 16:08:57 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-04-30 16:09:41 +00:00
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
2021-04-30 16:08:57 +00:00
|
|
|
steps:
|
2023-05-31 13:06:00 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-04-30 16:08:57 +00:00
|
|
|
|
2023-09-04 13:09:57 +00:00
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v3
|
2021-04-30 16:08:57 +00:00
|
|
|
with:
|
2024-06-05 11:00:01 +00:00
|
|
|
go-version: '1.22'
|
2023-09-04 13:09:57 +00:00
|
|
|
cache: true
|
|
|
|
|
|
|
|
- name: Install linters
|
|
|
|
run: make lint-install
|
|
|
|
|
|
|
|
- name: Run linters
|
|
|
|
run: make lint
|
2021-04-30 16:08:57 +00:00
|
|
|
|
|
|
|
tests:
|
|
|
|
name: Tests
|
2023-05-31 13:06:00 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-04-30 16:08:57 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-08-21 11:58:27 +00:00
|
|
|
go_versions: [ '1.22', '1.23' ]
|
2021-04-30 16:08:57 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
2023-05-31 13:06:00 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-04-30 16:08:57 +00:00
|
|
|
|
|
|
|
- name: Set up Go
|
2023-05-31 13:06:00 +00:00
|
|
|
uses: actions/setup-go@v3
|
2021-04-30 16:08:57 +00:00
|
|
|
with:
|
|
|
|
go-version: '${{ matrix.go_versions }}'
|
|
|
|
|
|
|
|
- name: Update Go modules
|
|
|
|
run: make dep
|
|
|
|
|
|
|
|
- name: Run tests
|
2024-08-21 11:58:27 +00:00
|
|
|
run: make test
|