diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 6bd2254..2ffa400 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -27,7 +27,5 @@ jobs: run: npm run prettier - name: Run ESLint run: npm run lint - - name: Run Jest - run: npm run test - name: Run build run: npm run build diff --git a/.github/workflows/jest.yml b/.github/workflows/jest.yml new file mode 100644 index 0000000..d3deea7 --- /dev/null +++ b/.github/workflows/jest.yml @@ -0,0 +1,30 @@ +name: Jest + +on: + pull_request: + branches: + - main + +env: + GIT_PAT: ${{ secrets.GIT_PAT }} + GIT_USERNAME: ${{ secrets.GIT_USERNAME }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + +jobs: + jest: + name: Run Jest + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@v3 + - name: Setup node with npm + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'npm' + - name: Download dependencies + run: npm ci + - name: Run Jest + run: npm run test + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3