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-05-31 13:06:00 +00:00
|
|
|
- name: golangci-lint
|
|
|
|
uses: https://github.com/golangci/golangci-lint-action@v2
|
2021-04-30 16:08:57 +00:00
|
|
|
with:
|
2023-05-31 13:06:00 +00:00
|
|
|
version: latest
|
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:
|
2023-08-28 11:09:40 +00:00
|
|
|
go_versions: [ '1.20', '1.21' ]
|
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
|
2023-05-31 13:06:00 +00:00
|
|
|
run: make test
|