diff --git a/.github/workflows/codeanalysis.yaml b/.github/workflows/codeanalysis.yaml new file mode 100644 index 00000000..e0e9c3ca --- /dev/null +++ b/.github/workflows/codeanalysis.yaml @@ -0,0 +1,44 @@ +name: Code analysis + +on: + push: + branches: + - develop + - main + pull_request: + branches: + - develop + - main + +jobs: + test-react-testing-library: + runs-on: ubuntu-latest + name: Run react testing library tests + + strategy: + matrix: + node-version: [21.x] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: | + **/node_modules + key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} + + - name: Install dependencies + run: npm install + + - name: Build code + run: npm run build + + - name: Run tests + run: CI=true npm run test-coverage +