Skip to content

fix: [#384] Create groups. #905

fix: [#384] Create groups.

fix: [#384] Create groups. #905

Workflow file for this run

---
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/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
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/codecov-action@v3
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') }}