build(deps): bump golang from 1.21.0-alpine3.18 to 1.21.5-alpine3.18 #950
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 | |
'on': push | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
shasum: shasum -a 512 | |
- os: ubuntu-latest | |
shasum: sha512sum | |
- os: windows-latest | |
shasum: sha512sum | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version: 1.19.0 | |
- name: Unit tests | |
run: | | |
go test -short -cover -v -coverprofile=coverage.txt \ | |
-covermode=atomic $(go list ./... |\ | |
grep -v internal/app/n3dr/goswagger |\ | |
grep -v internal/app/n3dr/n3drtest |\ | |
grep -v cmd/n3dr) | |
if: ${{ startsWith(matrix.os, 'ubuntu') }} | |
- uses: codecov/[email protected] | |
with: | |
files: ./coverage.txt | |
flags: unittests | |
verbose: true | |
if: ${{ startsWith(matrix.os, 'ubuntu') }} | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
with: | |
args: > | |
-Dsonar.organization=030-github | |
-Dsonar.projectKey=030_n3dr | |
-Dsonar.exclusions=test/testdata/**,internal/app/n3dr/goswagger/** | |
-Dsonar.sources=. | |
-Dsonar.coverage.exclusions=**/*_test.go,test/testdata/**,internal/app/n3dr/goswagger/**/*,cmd/**/* | |
-Dsonar.verbose=true | |
-Dsonar.go.coverage.reportPaths="coverage.txt" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
if: ${{ startsWith(matrix.os, 'ubuntu') }} | |
- name: Set N3DR deliverable environment variable | |
run: echo "n3dr-deliverable=n3dr-${{ matrix.os }}" >> $GITHUB_ENV | |
- name: Use the value | |
run: | | |
echo "${{ env.n3dr-deliverable }}" | |
- name: Build | |
run: ./scripts/build.sh | |
env: | |
N3DR_DELIVERABLE: ${{ env.n3dr-deliverable }} | |
SHA512_CMD: ${{ matrix.shasum }} | |
- name: Quality | |
run: | | |
docker run --rm -v "$PWD:/mnt" koalaman/shellcheck:v0.7.1 */*.sh -x | |
docker run --rm -v ${PWD}:/data markdownlint/markdownlint:0.11.0 \ | |
README.md -s /data/configs/.markdownlint.rb | |
docker run --rm -v $(pwd):/app -w /app -e GOFLAGS=-buildvcs=false \ | |
golangci/golangci-lint:v1.54.2-alpine golangci-lint run -v \ | |
--timeout 2m30s --config configs/.golangci.yml | |
if: ${{ startsWith(matrix.os, 'ubuntu') }} |