Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 17 additions & 27 deletions .github/workflows/tests-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Tests CI

name: Test with Coverage report
on:
pull_request:
branches: ['main', 'develop']
pull_request:
branches:
- develop
- main

jobs:
build:
name: Run Coverage Tests
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- name: Checkout Branch To Runner
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install Yarn
run: yarn install --prefer-offline --immutable
- name: Run Coverage Tests
run: yarn run test:ci
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout Branch To Runner
uses: actions/checkout@v3

- name: Jest coverage report
uses: ArtiomTr/jest-coverage-report-action@v2.2.1
with:
package-manager: yarn
test-script: yarn test:ci
annotations: all
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
/.cache
/build
/public/build
/coverage
.env
package-lock.json

Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
'^.+\\.(t|j)sx?$': 'ts-jest',
},
setupFilesAfterEnv: ['./jest.setup.js'],
reporters: [['github-actions', { silent: false }], 'summary'],
coverageThreshold: {
global: {
branches: 100,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"start": "remix-serve build",
"prepare": "husky install",
"test": "jest",
"test:ci": "jest --coverage --silent --ci",
"test:ci": "jest --ci --json --coverage --testLocationInResults --outputFile=report.json",
"sb": "start-storybook -p 6006",
"build-sb": "build-storybook"
},
Expand Down