Skip to content

Commit

Permalink
test and test coverage workflow to enforce test requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
rockerbacon committed Jan 27, 2024
1 parent c62a023 commit 98624a0
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Unit Tests
on:
pull_request:
types:
- opened
- synchronize
paths:
- '.github/workflows/unit_tests.yml'
- '**.go'
- 'go.mod'
- 'qa/test_coverage.py'
- 'qa/test.py'

jobs:
run_tests:
name: Run Tests
strategy:
fail-fast: true
matrix:
runner:
- ubuntu-22.04
- windows-2022
- macos-12

runs-on: ${{ matrix.runner }}
steps:
- name: Clone repository
uses: actions/checkout@v4

# Go is pre-installed in MacOS and Windows runners
- name: Install Go
if: ${{ matrix.runner == 'ubuntu-22.04' }}
run: sudo apt install golang-go

- name: Run tests
if: ${{ matrix.runner != 'windows-2022' }}
run: python3 qa/test.py

- name: Run tests
if: ${{ matrix.runner == 'windows-2022' }}
run: py qa\test.py

validate_test_coverage:
name: Validate Test Coverage
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Install Go
run: sudo apt install golang-go

- name: Validate test coverage
run: python3 qa/test_coverage.py

0 comments on commit 98624a0

Please sign in to comment.