Unit Test #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: Unit Test | |
run-name: Unit Test | |
on: | |
workflow_run: | |
workflows: [Build] | |
types: [completed] | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
unit-test: | |
name: Run Unit Test | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21.7.3' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Install React 18.3.1 | |
run: | | |
npm uninstall react react-dom | |
npm install [email protected] [email protected] | |
- name: Start App | |
run: | | |
npm run start & | |
- name: Run Unit Tests | |
run: npm run test |