2021-02-19 07:49:15 +01:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-08-20 02:12:46 +02:00
|
|
|
branches: [main]
|
2021-02-19 07:49:15 +01:00
|
|
|
pull_request:
|
2023-08-20 02:12:46 +02:00
|
|
|
branches: [main]
|
2021-02-19 07:49:15 +01:00
|
|
|
|
2022-06-01 20:09:12 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-02-19 07:49:15 +01:00
|
|
|
jobs:
|
|
|
|
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-08 19:29:19 +02:00
|
|
|
go_version: [1.22.x]
|
2021-02-19 07:49:15 +01:00
|
|
|
steps:
|
|
|
|
|
2023-10-24 14:12:50 +02:00
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2021-02-19 07:49:15 +01:00
|
|
|
- name: Set up Go 1.x
|
2024-01-09 10:11:53 +01:00
|
|
|
uses: actions/setup-go@v5
|
2021-02-19 07:49:15 +01:00
|
|
|
with:
|
2023-10-24 14:52:13 +02:00
|
|
|
go-version-file: './go.mod'
|
|
|
|
check-latest: true
|
|
|
|
- run: go version
|
2021-02-19 07:49:15 +01:00
|
|
|
|
2021-02-19 08:41:24 +01:00
|
|
|
- name: Test
|
|
|
|
run: go test -v ./...
|
|
|
|
|
2021-02-19 07:49:15 +01:00
|
|
|
- name: Setup examples for testing
|
|
|
|
run: ./.github/scripts/setup_examples_test.bash
|
|
|
|
|
|
|
|
- name: Test examples
|
2021-02-19 08:41:24 +01:00
|
|
|
continue-on-error: true
|
2021-02-19 07:49:15 +01:00
|
|
|
working-directory: _examples
|
|
|
|
run: go test -v -mod=mod -cover -race ./...
|