Merge pull request #594 from radiofrance/renovate/github.com-aws-aws-… #660
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.0 | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
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@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 | |
with: | |
# renovate: datasource=github-releases depName=golangci/golangci-lint | |
version: v1.61.0 | |
tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
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@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.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@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: coverage-results | |
- uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true |