fix(deps): update jest monorepo #411
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: Main | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: Node.js ${{ matrix.node-version }} ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [16.x] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- name: Cache yarn cache | |
uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Build project | |
run: yarn build | |
- name: Cache VS Code binaries | |
uses: actions/cache@v3 | |
id: vscode-cache | |
with: | |
path: .vscode-test | |
key: ${{ runner.os }}-vscode-${{ hashFiles('e2e/jest-runner-vscode.config.js') }} | |
restore-keys: | | |
${{ runner.os }}-vscode- | |
- name: Download VS Code | |
run: yarn ci:download-vscode | |
- name: Run tests (Linux) | |
if: runner.os == 'Linux' | |
run: xvfb-run -a yarn test | |
- name: Run tests (non-Linux) | |
if: runner.os != 'Linux' | |
run: yarn test |