1.1.1 #27
This file contains hidden or 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: RunTests | |
| on: | |
| push: | |
| branches: ['main', 'develop'] | |
| pull_request: | |
| branches: ['main'] | |
| types: [opened, reopened, edited] | |
| jobs: | |
| RunTestSuite: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
| name: Run Test Suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo and submodules | |
| uses: actions/checkout@v4 | |
| - name: Install NodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install node packages | |
| run: npm install | |
| - name: Run tests | |
| run: npm run test:ci | |
| env: | |
| NODE_OPTIONS: '--experimental-vm-modules' | |
| - name: Publish Test Results | |
| uses: EnricoMi/[email protected] | |
| if: always() | |
| with: | |
| files: ./coverage/test-report/test-report.xml | |
| - name: Publish Code Coverage | |
| uses: irongut/[email protected] | |
| with: | |
| filename: coverage/cobertura-coverage.xml | |
| badge: true | |
| format: markdown | |
| output: both | |
| - name: Add Coverage PR Comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| recreate: true | |
| path: code-coverage-results.md | |
| - name: Write to job Summary | |
| run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY |