Skip to content

Tests refactoring

Tests refactoring #95

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
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
- name: Test
run: echo "Result ${{ steps.run-mutation-tests.outcome == 'success' }}"
- uses: thollander/actions-comment-pull-request@v2
if: steps.run-mutation-tests.outcome == 'success'
with:
message: |
✅👾 Mutation testing passed score threshold\n\nReport: https://dashboard.stryker-nutator.io/reports/github.com/editor-js/document-model/${{ github.ref_name }}
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\n\nReport: https://dashboard.stryker-nutator.io/reports/github.com/editor-js/document-model/${{ github.ref_name }}
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