Merge pull request #199 from deploymenttheory/feat_intune_settings_te… #274
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: Unit Tests | |
on: | |
push: | |
branches: [ '*' ] | |
paths-ignore: | |
- '**/*.yml' | |
- '**/*.md' | |
- '**/*.yml' | |
- 'LICENSE' | |
- '.gitignore' | |
- '.editorconfig' | |
- 'docs/**' | |
- '.github/ISSUE_TEMPLATE/**' | |
- 'examples/**' | |
- 'website/**' | |
- '.vscode/**' | |
- '.idea/**' | |
- '**/*.txt' | |
- '**/*.png' | |
- '**/*.jpg' | |
- '**/*.svg' | |
- '.golangci.yml' | |
- 'Makefile' | |
- 'scripts/**' | |
- '.dockerignore' | |
- 'dockerfile' | |
jobs: | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@v4.2.2 | |
- uses: actions/setup-go@v5.1.0 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
go-version: stable | |
- name: Install dependencies | |
run: go mod download | |
- name: Run tests | |
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... | |
# TODO - setup codecov server side | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v4.5.0 | |
# with: | |
# file: ./coverage.txt | |
# flags: unittests | |
# fail_ci_if_error: true | |
# env: | |
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |