Skip to content

Commit

Permalink
Merge pull request #10 from ZIMkaRU/feature/add-test-runner-and-repor…
Browse files Browse the repository at this point in the history
…t-to-github-actions

Add github actions workflow for test-runner
  • Loading branch information
ZIMkaRU authored Oct 10, 2023
2 parents c4d7403 + a63730b commit f628bab
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI
run-name: 'Run tests: Commit ${{ github.sha }}'

on:
pull_request:
types: [opened, reopened, edited]
branches:
- master
workflow_dispatch:

jobs:
linux-test-runner:
name: Linux Test Runner
timeout-minutes: 30
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 18.17.1
- name: Setup configs and install deps
run: ./scripts/setup.sh -u
- name: Run tests
run: npm test -- -- --reporter=json --reporter-option output=test-report.json
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: test-report.json
23 changes: 23 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Test Report'

on:
workflow_run:
workflows: ['CI']
types:
- completed

permissions:
contents: read
actions: read
checks: write

jobs:
report:
runs-on: ubuntu-22.04
steps:
- uses: dorny/test-reporter@v1
with:
artifact: test-results
name: Test Report
path: test-report.json
reporter: mocha-json

0 comments on commit f628bab

Please sign in to comment.