Skip to content

Commit

Permalink
Merge pull request #25 from OneBusAway/feature/run-tests
Browse files Browse the repository at this point in the history
added the test file to run tests as part of CI
  • Loading branch information
aaronbrethorst authored Jul 15, 2024
2 parents a7e312b + de17735 commit 9b284a4
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test

on:
push:
branches:
- main
- 'feature/*'
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache npm install artifacts
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Run tests
run: npm run test
env:
CI: true

- name: Display test results
if: failure()
run: |
echo "Tests failed. Please check the test output for more details."
continue-on-error: true

0 comments on commit 9b284a4

Please sign in to comment.