diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 1192d35..9e770c9 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -92,4 +92,39 @@ jobs: run: cd frontend && npm i - name: Run the unit tests - run: cd frontend && npm run test-ci \ No newline at end of file + run: cd frontend && npm run test-ci + + static-analysis: + name: 🔬 Run Static Code Analysis + needs: [build] + runs-on: ubuntu-latest + permissions: + security-events: write + steps: + - uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + config-file: ./.github/codeql/codeql.config.yml + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Cache Node Modules + id: cache + uses: actions/cache@v3 + with: + path: frontend/node_modules + key: fe-node-${{ hashFiles('frontend/package-lock.json') }} + + - name: Install Deps + run: cd frontend && npm i + + - name: Build + run: cd frontend && npm run build + + - name: Perform Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file