test: fix jest via add of ts-jest module, cleaner ts-ignore use #972
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: Jest Tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- '**/*.md' | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/**' | |
- '**/*.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
jest: | |
name: Jest | |
timeout-minutes: 50 | |
runs-on: ubuntu-latest | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 50 | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Set workflow variables | |
id: workflow-variables | |
run: | | |
echo "yarn-cache=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
name: Yarn Cache | |
id: yarn-cache | |
with: | |
path: ${{ steps.workflow-variables.outputs.yarn-cache }} | |
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('package.json', 'packages/react-native/package.json', 'tests_react_native/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Yarn Install | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
retry_wait_seconds: 60 | |
max_attempts: 4 | |
command: yarn --no-audit --prefer-offline | |
- name: Jest | |
run: yarn tests_rn:test | |
- uses: codecov/codecov-action@v4 | |
with: | |
verbose: true |