sleep inf for interactive test #60
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
permissions: | |
contents: read | |
pull-requests: read | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest"] | |
go: ["1.18.x", "1.19.x"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Setup Go | |
uses: WillAbides/[email protected] | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Static code analysis | |
uses: dominikh/[email protected] | |
with: | |
version: "2022.1.1" | |
install-go: false | |
cache-key: ${{ matrix.go }} | |
- name: Run Go vet | |
run: "go vet ./..." | |
- name: Make all | |
run: "make all" | |
- name: Unit tests | |
run: "go test ./..." | |
coverage: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Setup Go | |
uses: WillAbides/[email protected] | |
with: | |
go-version: "1.19.x" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Install dependencies | |
run: | | |
go mod download | |
- name: Run Unit tests | |
run: | | |
go test -race -covermode atomic -coverprofile=covprofile ./... | |
- name: Install goveralls | |
run: go install github.com/mattn/goveralls@latest | |
- name: Send coverage | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: goveralls -coverprofile=covprofile -service=github |