Bump github.com/golangci/golangci-lint from 1.60.1 to 1.60.3 in /src #1974
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: Go build and test | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- "src/**" | |
- "tcr-doc/**" | |
- "!examples/**" | |
- "!**/*.md" | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
os: [ macos-latest, ubuntu-latest, windows-latest ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Skip duplicate actions | |
uses: fkirc/skip-duplicate-actions@v5.3.1 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
check-latest: true | |
cache-dependency-path: src/go.mod | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
check-latest: true | |
- name: Install gotestsum | |
run: | | |
go install gotest.tools/gotestsum@latest | |
- name: Test tcr module | |
run: | | |
cd src | |
make tidy | |
make test | |
- name: Send tcr coverage to coveralls.io | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
working-directory: src | |
path-to-profile: _test_results/coverage.out | |
flag-name: tcr-${{ matrix.os }} | |
parallel: true | |
- name: Build tcr application | |
run: | | |
cd src | |
go build -v ./... | |
# This step must be executed after the test steps so that coverage data is sent to SonarCloud | |
- name: SonarCloud Scan | |
if: ${{ matrix.os == 'ubuntu-latest' && github.actor != 'dependabot[bot]' }} | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
BUILD_NUMBER: ${{ github.run_number }} | |
# notifies coveralls.io that all test jobs are finished. | |
finish: | |
needs: build | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
steps: | |
- uses: shogo82148/actions-goveralls@v1 | |
with: | |
parallel-finished: true |