Skip to content

⬆️ Update codecov/codecov-action action to v4 #1215

⬆️ Update codecov/codecov-action action to v4

⬆️ Update codecov/codecov-action action to v4 #1215

Workflow file for this run

---
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 }}