Skip to content

Commit ad85b9b

Browse files
committed
ci: caching and fixes
1 parent d84ff28 commit ad85b9b

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/test-runner.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ jobs:
1919

2020
runs-on: ubuntu-latest
2121

22+
defaults:
23+
run:
24+
working-directory: packages/world-plugin
25+
2226
# Define the matrix of different PHP, Laravel, testbench versions, and shards
2327
strategy:
2428
# Fail the whole workflow if one of the jobs fails
@@ -73,14 +77,25 @@ jobs:
7377
uses: actions/setup-node@v4
7478
with:
7579
node-version: lts/*
80+
cache: 'npm'
81+
cache-dependency-path: packages/world-plugin/package-lock.json
82+
83+
- name: Cache Playwright browsers
84+
uses: actions/cache@v3
85+
with:
86+
path: ~/.cache/ms-playwright
87+
key: ms-playwright-${{ runner.os }}-${{ hashFiles('packages/world-plugin/package-lock.json') }}
88+
restore-keys: |
89+
ms-playwright-${{ runner.os }}-
7690
7791
- name: Install Playwright
7892
run: |
79-
npm install playwright@latest
93+
npm ci
8094
npx playwright install --with-deps
8195
82-
- name: Generate application key
96+
- name: Prepare app env
8397
run: |
98+
php -r 'if (!file_exists("workbench/.env")) { copy("workbench/.env.example", "workbench/.env"); echo ".env created\n"; }'
8499
php vendor/bin/testbench key:generate --ansi
85100
86101
- name: Run test suite

0 commit comments

Comments
 (0)