2023-05-31 16:24:17 +00:00
|
|
|
on: [pull_request]
|
2021-05-21 15:45:01 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-31 16:24:17 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-05-25 15:17:23 +00:00
|
|
|
|
2021-05-21 15:45:01 +00:00
|
|
|
- name: golangci-lint
|
2023-05-31 16:24:17 +00:00
|
|
|
uses: https://github.com/golangci/golangci-lint-action@v2
|
2021-05-21 15:45:01 +00:00
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
|
|
|
|
tests:
|
|
|
|
name: Tests
|
2023-05-31 16:24:17 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-05-21 15:45:01 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-05-31 16:24:17 +00:00
|
|
|
go_versions: [ '1.19', '1.20' ]
|
2021-05-21 15:45:01 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
2023-05-31 16:24:17 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-05-21 15:45:01 +00:00
|
|
|
|
|
|
|
- name: Set up Go
|
2023-05-31 16:24:17 +00:00
|
|
|
uses: actions/setup-go@v3
|
2021-05-21 15:45:01 +00:00
|
|
|
with:
|
|
|
|
go-version: '${{ matrix.go_versions }}'
|
2023-06-01 13:47:29 +00:00
|
|
|
|
2021-05-21 15:45:01 +00:00
|
|
|
- name: Update Go modules
|
|
|
|
run: make dep
|
|
|
|
|
|
|
|
- name: Run tests
|
2023-06-01 13:47:29 +00:00
|
|
|
run: make test
|