using fill-600 #23
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", "develop" ] | |
paths-ignore: | |
- '**.md' | |
- '**.sh' | |
- '**.yml' | |
- '**.yaml' | |
pull_request: | |
branches: [ "master", "develop" ] | |
workflow_dispatch: | |
inputs: | |
cover_packages: | |
description: 'passed to the go test -coverpkg flag' | |
type: string | |
run_regex: | |
description: 'passed to the go test -run flag' | |
type: string | |
default: 'Test' | |
required: true | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.23 | |
- name: Vet | |
run: go vet ./... | |
shell: bash | |
- name: TestUbuntuCoverage | |
run: TEST_REGEX=${{inputs.run_regex}} TEST_PACKAGES=${{inputs.cover_packages}} make test_cover | |
shell: bash | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
build: | |
name: Build | |
needs: test | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.23 | |
- name: Build amd64 | |
run: | | |
GOARCH=amd64 go build -v ./... | |
shell: bash | |
- name: Build arm64 | |
if: | | |
matrix.os != 'windows-latest' | |
run: | | |
GOARCH=arm64 go build -v ./... | |
shell: bash | |
- name: Finish | |
run: | | |
echo ":rocket: Build complete!" >> $GITHUB_STEP_SUMMARY |