Fix files flag for windows #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
"on": | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
jobs: | |
check: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '1.21' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v "-test.v=true" ./... | |
- name: Check examples | |
run: | | |
./_examples/clean.sh | |
./_examples/build-examples.sh | |
if $(git diff --quiet); then | |
echo "examples are clean" | |
else | |
echo "examples are dirty, rebuild it locally before commiting" | |
git diff | cat | |
exit 1 | |
fi | |
- name: Coverage report | |
run: | | |
go test -v -covermode=count -coverprofile=coverage.out -tags coverage ./... | |
go tool cover -func=coverage.out | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Vet | |
run: go vet | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.61.0 |