Display company cards #45915
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: Jest Unit Tests | |
on: | |
workflow_call: | |
pull_request: | |
types: [opened, synchronize] | |
branches-ignore: [staging, production] | |
jobs: | |
jest: | |
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} | |
runs-on: ubuntu-latest | |
env: | |
CI: true | |
strategy: | |
fail-fast: false | |
matrix: | |
chunk: [ 1, 2, 3 ] | |
name: test (job ${{ fromJSON(matrix.chunk) }}) | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: Expensify/App/.github/actions/composite/setupNode@main | |
- name: Get number of CPU cores | |
id: cpu-cores | |
uses: SimenB/github-actions-cpu-cores@31e91de0f8654375a21e8e83078be625380e2b18 | |
- name: Cache Jest cache | |
id: cache-jest-cache | |
uses: actions/cache@ac25611caef967612169ab7e95533cf932c32270 | |
with: | |
path: .jest-cache | |
key: ${{ runner.os }}-jest | |
- name: Jest tests | |
run: npx jest --silent --shard=${{ fromJSON(matrix.chunk) }}/${{ strategy.job-total }} --max-workers ${{ steps.cpu-cores.outputs.count }} | |
storybookTests: | |
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} | |
runs-on: ubuntu-latest | |
name: Storybook tests | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Expensify/App/.github/actions/composite/setupNode@main | |
- name: Storybook run | |
run: npm run storybook -- --smoke-test --ci | |
shellTests: | |
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} | |
runs-on: ubuntu-latest | |
name: Shell tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: Expensify/App/.github/actions/composite/setupNode@main | |
- name: Test CI git logic | |
run: tests/unit/CIGitLogicTest.sh |