migrate tests to vitest #166
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
- beta | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
## Cache not important | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Deps | |
run: yarn install | |
- name: Check types of a core package | |
run: cd iti && yarn tsd | |
- name: Run tests of a core package | |
run: cd iti && yarn test | |
- name: Check if a core package builds | |
run: cd iti && yarn build | |
- name: Check types of a react package | |
run: cd iti-react && yarn tsd | |
- name: Check if a react package builds | |
run: cd iti-react && yarn build | |
- name: Add Stryker Report | |
run: | | |
cd iti && yarn run stryker:run | |
# cd reports/mutation/ && curl -X PUT \ | |
# https://dashboard.stryker-mutator.io/api/reports/github.com/molszanski/iti/beta \ | |
# -H 'Content-Type: application/json' \ | |
# -H 'Host: dashboard.stryker-mutator.io' \ | |
# -H "X-Api-Key: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}" \ | |
# -d @mutation.json | |
env: | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} |