Use unchanging version tag in tests #421
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: setup go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v4 | |
with: | |
go-version-file: ./go.mod | |
- name: setup task | |
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# Builds the binary into the bin/ directory | |
- name: build | |
run: |- | |
task build | |
- name: upload artifact | |
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 | |
with: | |
name: frizbee | |
path: bin/frizbee | |
cover: | |
name: Coverage | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Set up Go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v4 | |
with: | |
go-version-file: 'go.mod' | |
- name: setup task | |
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run coverage | |
run: task cover | |
# Using gcov didn't seem to work for the coveralls app, so we convert it to lcov | |
- name: Try converting to LCOV | |
run: go run github.com/jandelgado/gcov2lcov@latest -infile=./coverage.out -outfile=./coverage.lcov | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0 | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: setup go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v4 | |
with: | |
go-version-file: ./go.mod | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v3 | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: setup go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v4 | |
with: | |
go-version-file: ./go.mod | |
- name: setup task | |
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: test | |
run: |- | |
task test | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Checks that the github workflows are valid using this same tool | |
frizbee: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- name: checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: download artifact | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 #v4.1.8 | |
with: | |
name: frizbee | |
path: bin/ | |
- name: Make frizbee executable | |
run: |- | |
chmod +x bin/frizbee | |
- name: Frizbee | |
run: |- | |
bin/frizbee actions --dry-run --error | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |