Add CI for running tests. (#7) #1
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v4 | |
- name: Install NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.12.0 | |
- name: Install dependencies | |
run: npm ci | |
- name: Run test suites | |
run: npm run test | |
- name: Print message | |
run: echo "All tests passed. 🎉 :)" | |
- name: Print github context for demo | |
run: echo "${{ toJson(github) }}" |