On error handler in pipeline #130
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
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- v* | |
- main | |
pull_request: | |
name: run tests | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: Run linters | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.52 | |
test: | |
strategy: | |
matrix: | |
go-version: [ '1.20', '1.19', '1.18'] | |
platform: [ 'ubuntu-latest' ] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Go | |
if: success() | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Run tests | |
run: go test -v -race ./... | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
if: success() | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Calc coverage | |
run: | | |
go test -cover ./... -coverpkg=github.com/Flowpack/prunner/... -coverprofile=coverage.txt | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 |