Rd 116 update documentation #54
Workflow file for this run
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: Run tests | |
on: [ pull_request ] | |
permissions: | |
contents: write | |
pull-requests: write | |
actions: write | |
# TODO: add check if changie file is set | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
go-version: [ '1.21.x' ] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
id: go | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run tests | |
run: | | |
task cover | |
mkdir -p output | |
cp coverage.out output/coverage.out | |
- name: Upload to codecov | |
uses: codecov/codecov-action@v3 | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: output | |
path: output/**/* | |
vet: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
go-version: [ '1.21.x' ] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
id: go | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run vet | |
run: task vet | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
go-version: [ '1.21.x' ] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
id: go | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
args: --issues-exit-code=0 --timeout=5m | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
go-version: [ '1.21.x' ] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
id: go | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: build binary | |
uses: goreleaser/goreleaser-action@v3 | |
with: | |
args: build --snapshot --clean --single-target | |
env: | |
GOPATH: ${{ env.GOPATH }} |