Skip to content

Commit

Permalink
build: create test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
R-unic committed Dec 31, 2024
1 parent d87da6d commit 05a0c99
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test

on:
pull_request:
push:
branches:
- master

jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rokit
run: curl -sSf https://raw.githubusercontent.com/rojo-rbx/rokit/main/scripts/install.sh | bash

- name: Install NPM Dependencies
run: npm i

- name: Run Tests
run: |
npm test | Tee-Object -file test-output.txt;
$output = Get-Content -Path main-test-output.txt;
if ($output -notmatch 'Failed: [^0]') {
exit 0
} else {
exit 1
}

0 comments on commit 05a0c99

Please sign in to comment.