⬆️ Update actions/upload-artifact action to v4 - autoclosed #722
Workflow file for this run
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: Testing | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
gotest: | |
name: Go ${{ matrix.go }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: ["1.19", "1.20"] | |
steps: | |
- name: ⤵️ Check out code from GitHub | |
uses: actions/[email protected] | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... -race -coverprofile=coverage.out -covermode=atomic | |
- name: ⬆️ Upload coverage artifact | |
uses: actions/[email protected] | |
with: | |
name: coverage-${{ matrix.go }} | |
path: coverage.out | |
coverage: | |
runs-on: ubuntu-latest | |
needs: gotest | |
steps: | |
- name: ⤵️ Check out code from GitHub | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: ⬇️ Download coverage data | |
uses: actions/[email protected] | |
- name: 🚀 Upload coverage report | |
uses: codecov/[email protected] | |
- name: SonarCloud Scan | |
if: github.event.pull_request.head.repo.fork == false | |
uses: SonarSource/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |