Security issue is solved #32 #9
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_CD | |
on: | |
push: | |
branches: [main, dev] | |
pull_request: | |
branches: [main, dev] | |
jobs: | |
build: | |
name: Build Project | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js Environment | |
uses: ./.github/actions/setup-node | |
- name: Build project | |
run: npm run build | |
unit-tests: | |
name: Run Unit Tests | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js Environment | |
uses: ./.github/actions/setup-node | |
- name: Run Jest Unit Tests | |
run: npm test -- --ci --testPathPattern ".*\\.unit\\.test\\.tsx$" | |
integration-tests: | |
name: Run Integration Tests | |
runs-on: ubuntu-latest | |
needs: unit-tests | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js Environment | |
uses: ./.github/actions/setup-node | |
- name: Run Jest Integration Tests | |
run: npm test -- --ci --testPathPattern ".*\\.integration\\.test\\.tsx$" | |
cypress-tests: | |
name: Run Cypress Tests | |
runs-on: ubuntu-latest | |
needs: integration-tests | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js Environment | |
uses: ./.github/actions/setup-node | |
- name: Start application | |
run: | | |
npm start & | |
npx wait-on http://localhost:3000 | |
- name: Run Cypress tests | |
uses: cypress-io/github-action@v5 | |
with: | |
browser: chrome |