Skip to content

Commit 5e92098

Browse files
authored
Merge pull request #13 from alexmarqs/chore/use-container-playwright-ci
chore: use playwright cache for ci tests
2 parents 1b6be00 + cc80534 commit 5e92098

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,20 @@ jobs:
6161
node-version-file: '.nvmrc'
6262
cache: 'npm'
6363

64-
- name: Install dependencies for web
65-
run: npm install --filter=@tech-companies-portugal/web
64+
- name: Cache Playwright browsers
65+
id: playwright-cache
66+
uses: actions/cache@v3
67+
with:
68+
path: ~/.cache/ms-playwright
69+
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}
6670

6771
- name: Install Playwright browsers
72+
if: steps.playwright-cache.outputs.cache-hit != 'true'
6873
run: npx playwright install chromium --with-deps
6974

75+
- name: Install dependencies for web
76+
run: npm install --filter=@tech-companies-portugal/web
77+
7078
- name: Run Playwright tests
7179
run: npm run test:e2e:web
7280

apps/web/tests/homepage.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test.describe("Homepage e2e tests", () => {
1717
// check if companies list is visible
1818
await expect(page.getByTestId("companies-list")).toBeVisible();
1919

20-
// check if there are more than 1 company items
20+
// check if there are companies in the list
2121
const companyItems = await page.getByTestId("company-item").all();
2222
expect(companyItems.length).toBeGreaterThan(1);
2323

0 commit comments

Comments
 (0)