Skip to content

Commit

Permalink
feat: refactoring of e2e workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-luzmo committed Aug 23, 2024
1 parent 08c1f4c commit 81cb906
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,33 @@ jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
PLAYWRIGHT_BROWSERS_PATH: pw-browsers/
defaults:
run:
working-directory: ./e2e
steps:
- uses: actions/checkout@v4
- name: Read .nvmrc
id: nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
run: echo "NODE_VERSION=$(cat .nvmrc)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
node-version: $NODE_VERSION
- name: Cache node modules
uses: actions/cache@v2
with:
path: e2e/node_modules
key: "${{ runner.os }}-node-${{ hashFiles('e2e/package-lock.json') }}"
- name: Cache browser
uses: actions/cache@v2
with:
path: $PLAYWRIGHT_BROWSERS_PATH
key: "${{ runner.os }}-node-${{ hashFiles('e2e/package-lock.json') }}"
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npm run pw install chromium --with-deps
run: npm run pw install chromium --with-deps --force
- name: Run Playwright tests
run: npm test
- uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 81cb906

Please sign in to comment.