Skip to content

Tests refactoring

Tests refactoring #100

Workflow file for this run

name: Main workflow runner
on:
- pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: Run ESLint check
run: yarn lint:ci
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: Run unit tests
uses: ArtiomTr/jest-coverage-report-action@v2
with:
test-script: "yarn test"
package-manager: yarn
mutation-tests:
runs-on: ubuntu-latest
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: Run mutation tests
id: run-mutation-tests
run: yarn test:mutations
continue-on-error: true
- uses: thollander/actions-comment-pull-request@v2
if: steps.run-mutation-tests.outcome == 'success'
with:
message: |
## ✅ Mutation testing passed score threshold
Report: https://dashboard.stryker-mutator.io/reports/github.com/editor-js/document-model/PR-${{ github.event.number }}
comment_tag: mutation-tests
- uses: thollander/actions-comment-pull-request@v2
if: steps.run-mutation-tests.outcome == 'failure'
with:
message: |
## ❌ Mutation testing hasn't passed score threshold
Report: https://dashboard.stryker-mutator.io/reports/github.com/editor-js/document-model/PR-${{ github.event.number }}
comment_tag: mutation-tests
- if: ${{ failure() }}
run: exit 1
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: Build the package
run: yarn build