2019-12-06 14:22:07 +03:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2021-09-21 19:15:31 +03:00
|
|
|
test:
|
|
|
|
name: Test
|
2020-09-06 00:53:06 +03:00
|
|
|
runs-on: ${{ matrix.os }}
|
2019-12-06 14:22:07 +03:00
|
|
|
strategy:
|
2021-09-21 12:25:18 +03:00
|
|
|
# Fail fast is disabled because there are Go version specific features and tests
|
|
|
|
# that should be able to fail independently.
|
|
|
|
fail-fast: false
|
2019-12-06 14:22:07 +03:00
|
|
|
matrix:
|
2021-09-21 12:26:55 +03:00
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2021-08-25 00:17:27 +03:00
|
|
|
go: ['1.14', '1.15', '1.16', '1.17']
|
2022-01-01 18:48:46 +03:00
|
|
|
tags: ['', 'viper_yaml3']
|
2019-12-06 14:22:07 +03:00
|
|
|
env:
|
|
|
|
GOFLAGS: -mod=readonly
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Go
|
2020-05-09 12:42:39 +03:00
|
|
|
uses: actions/setup-go@v2
|
2019-12-06 14:22:07 +03:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
|
|
|
|
|
|
|
- name: Checkout code
|
2020-01-16 21:27:10 +03:00
|
|
|
uses: actions/checkout@v2
|
2019-12-06 14:22:07 +03:00
|
|
|
|
2021-09-21 19:15:31 +03:00
|
|
|
- name: Test
|
2022-01-01 18:48:46 +03:00
|
|
|
run: go test -race -tags '${{ matrix.tags }}' -v ./...
|
2021-12-28 11:37:48 +03:00
|
|
|
if: runner.os != 'Windows'
|
|
|
|
|
|
|
|
- name: Test (without race detector)
|
2022-01-01 18:48:46 +03:00
|
|
|
run: go test -tags '${{ matrix.tags }}' -v ./...
|
2021-12-28 11:37:48 +03:00
|
|
|
if: runner.os == 'Windows'
|
2021-09-21 19:15:31 +03:00
|
|
|
|
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GOFLAGS: -mod=readonly
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.17
|
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-05-09 12:42:39 +03:00
|
|
|
- name: Lint
|
2021-09-21 12:34:22 +03:00
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
2021-11-21 16:53:16 +03:00
|
|
|
version: v1.43.0
|