security #439
Workflow file for this run
This file contains hidden or 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: Continuous Integration on Pull Request | |
| on: | |
| pull_request: | |
| branches: [staging, main] | |
| jobs: | |
| Audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetching node version | |
| run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
| id: nvm | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Verify vulnerabilities | |
| run: npm audit | |
| Test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetching node version | |
| run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
| id: nvm | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarqube-scan-action@v6 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| - name: Codacy Scan | |
| uses: codacy/[email protected] | |
| with: | |
| project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
| coverage-reports: ./coverage/lcov.info | |
| Build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetching node version | |
| run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
| id: nvm | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Verify build | |
| run: npm run build -- --noEmit | |
| Lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetching node version | |
| run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
| id: nvm | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Verify build | |
| run: npm run build -- --noEmit |