Skip to content

fix: [#535] Go mod updater go mod tidy (#537) #1197

fix: [#535] Go mod updater go mod tidy (#537)

fix: [#535] Go mod updater go mod tidy (#537) #1197

Workflow file for this run

---
name: Go
'on':
push:
branches-ignore:
- dependabot/**
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-file: 'go.mod'
cache: false
- 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/[email protected]
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
if: ${{ startsWith(matrix.os, 'ubuntu') }}