pull/7267/head
zomars 2023-02-18 15:36:00 -07:00
parent 5a597644a0
commit 0d639fdeb9
1 changed files with 14 additions and 9 deletions

View File

@ -7,23 +7,28 @@ on:
required: true required: true
jobs: jobs:
e2e-test: setup:
name: E2E tests name: Yarn install & cache
runs-on: ubuntu-latest runs-on: ubuntu-latest
concurrency:
group: yarn-install-${{ github.sha }}
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: ${{ env.node_version }} node-version: ${{ secrets.NODE_VERSION }}
- name: Restore node_modules from cache # node_module cache helps to avoid 1 minute copying from yarn cache on every job run
- name: node_modules cache
id: node-modules-cache
uses: actions/cache@v3 uses: actions/cache@v3
env: env:
cache-name: node-modules-yarn cache-name: node-modules-yarn
cache-fingerprint: ${{ env.node_version }}-${{ hashFiles('yarn.lock') }} cache-key: ${{ secrets.NODE_VERSION }}-${{ hashFiles('yarn.lock') }}
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.cache-fingerprint }} key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.cache-key }}
- run: yarn playwright install restore-keys: ${{ runner.os }}-${{ env.cache-name }}-
- name: Run tests - name: Yarn install
run: yarn e2e if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: yarn install --prefer-offline --frozen-lockfile