Skip to content

Merge pull request #55 from cam-inc/develop #36

Merge pull request #55 from cam-inc/develop

Merge pull request #55 from cam-inc/develop #36

Workflow file for this run

name: CI
on:
# NOTE: To comment SonarCloud coverage to GitHub Pull Request, we need to run the CI on pull requests.
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- develop
- main
jobs:
test:
name: Test and upload coverage to SonarCloud
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 1.26.1
- name: Test with coverage
run: go test --tags=test -coverprofile=cover.out $(go list ./... | grep -v mxtransporter/cmd)
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@ba3875ecf642b2129de2b589510c81a8b53dbf4e # master (2024-09-27, archived)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}