Merge pull request #687 from radiofrance/renovate/goreleaser-goreleas… #1011
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: QA | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
types: [opened, synchronize] | |
paths: | |
- ".github/workflows/qa.yml" | |
- "go.*" | |
- "**.go" | |
push: | |
branches: [main] | |
permissions: | |
contents: read | |
pull-requests: read | |
checks: write | |
jobs: | |
lint: | |
name: Run linters | |
runs-on: ubuntu-latest | |
env: | |
# renovate: datasource=github-releases depName=radiofrance/lint-config | |
LINT_CONFIG_VERSION: v1.0.1 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 | |
with: | |
go-version-file: "go.mod" | |
- name: Download golangci-lint config file | |
run: curl -o .golangci.yml https://raw.githubusercontent.com/radiofrance/lint-config/${{ env.LINT_CONFIG_VERSION }}/.golangci.yml | |
- uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0 | |
with: | |
# renovate: datasource=github-releases depName=golangci/golangci-lint | |
version: v1.63.4 | |
tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 | |
with: | |
go-version-file: "go.mod" | |
- uses: tlylt/install-graphviz@b2201200d85f06f0189cb74d9b69208504cf12cd # v1.0.0 | |
- run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./... | |
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 | |
with: | |
name: coverage-results | |
path: coverage.out | |
retention-days: 1 | |
codecov: | |
name: Upload coverage to Codecov | |
needs: [tests] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: coverage-results | |
- uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true |