diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2025-07-01 11:22:19 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2025-07-01 11:30:34 +0200 |
| commit | 22d78bbb8d417325d8122139d62fea8c52a996ed (patch) | |
| tree | d47580f77788953ce06d83fd9a3b645e038e6032 /.github/workflows/checks.yaml | |
| parent | 11c1f44090897da2a4f35ff4a250a4de854c5951 (diff) | |
| download | go-gg-22d78bbb8d417325d8122139d62fea8c52a996ed.tar.gz | |
add golangci-lint config
Diffstat (limited to '.github/workflows/checks.yaml')
| -rw-r--r-- | .github/workflows/checks.yaml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml new file mode 100644 index 0000000..c406d98 --- /dev/null +++ b/.github/workflows/checks.yaml @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: 2025 Stefan Majewsky <majewsky@gmx.net> +# SPDX-License-Identifier: Apache-2.0 + +name: Checks +"on": + push: + branches: [ main ] + pull_request: + branches: [ '*' ] + workflow_dispatch: {} +permissions: + checks: write + contents: read +jobs: + checks: + name: Checks + runs-on: ubuntu-latest + steps: + + #################### + ### Setup Phase + + - name: Check out code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + check-latest: true + go-version: stable + + #################### + # Static Tests + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v8 + with: + version: latest + + #################### + # Test Suite + + - name: Run tests + run: go test -shuffle=on -coverprofile=cover.out -covermode=count ./... + - name: Upload coverage report to Coveralls + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_BRANCH: ${{ github.head_ref }} + run: | + go install github.com/mattn/goveralls@latest + goveralls -service=github -coverprofile=cover.out |
