Merge pull request #35 from spekary/alert_update #62
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: Go | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
go: ['1.21', '1.20'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Install Go Imports | |
run: go install golang.org/x/tools/cmd/goimports@latest | |
- name: Build | |
run: go install | |
- name: Test | |
run: | | |
go test -v -cover ./... -coverprofile coverage.out -coverpkg ./... | |
- name: Upload coverage to Codecov | |
if: ${{ runner.os == 'Linux' && matrix.go == '1.21' }} | |
run: bash <(curl -s https://codecov.io/bash) |