build: run install rokit script as .sh #7
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: Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Rokit | |
run: | | |
curl -sSf -o install_rokit.sh https://raw.githubusercontent.com/rojo-rbx/rokit/main/scripts/install.sh | |
chmod +x install_rokit.sh | |
install_rokit.sh | |
- name: Install NPM dependencies | |
run: npm i | |
- name: Run Tests | |
run: | | |
npm test | tee test-output.txt | |
output=$(<test-output.txt) | |
if [[ ! $output =~ Failed:[^0] ]]; then | |
exit 0 | |
else | |
exit 1 | |
fi |