2024-11-15 11:27:04 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
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
|
|
|
|
2023-08-25 14:16:24 +00:00
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v3
|
2021-05-21 15:45:01 +00:00
|
|
|
with:
|
2024-08-21 09:47:18 +00:00
|
|
|
go-version: '1.23'
|
2023-08-25 14:16:24 +00:00
|
|
|
cache: true
|
|
|
|
|
|
|
|
- name: Install linters
|
|
|
|
run: make lint-install
|
|
|
|
|
|
|
|
- name: Run linters
|
|
|
|
run: make lint
|
2021-05-21 15:45:01 +00:00
|
|
|
|
|
|
|
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:
|
2024-08-21 09:47:18 +00:00
|
|
|
go_versions: [ '1.22', '1.23' ]
|
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
|