Skip to content

Commit 750bce6

Browse files
author
Pau Tena
committed
Fix playwright workflow
1 parent 0522f9b commit 750bce6

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

.github/workflows/playwright.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,21 @@ jobs:
4141
if: ${{ needs.changes.outputs.changed == 'true' }}
4242
timeout-minutes: 60
4343
runs-on: ubuntu-latest
44+
env:
45+
ENVIRONMENT: local
4446
strategy:
4547
matrix:
4648
shardIndex: [1, 2, 3, 4]
4749
shardTotal: [4]
4850
fail-fast: false
4951
steps:
5052
- uses: actions/checkout@v4
53+
- name: Install 1Password CLI
54+
uses: 1password/install-cli-action@v1
55+
- name: Load secrets from 1Password
56+
uses: 1password/load-secrets-action/configure@v2
57+
with:
58+
service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
5159
- uses: actions/setup-node@v4
5260
with:
5361
node-version: lts/*
@@ -68,13 +76,13 @@ jobs:
6876
working-directory: backend
6977
- run: npm ci
7078
working-directory: frontend
71-
- run: uv run bash scripts/generate-client.sh
79+
- run: op run --env-file=".env" -- uv run bash scripts/generate-client.sh
7280
env:
7381
VIRTUAL_ENV: backend/.venv
74-
- run: docker compose build
82+
- run: op run --env-file=".env" -- docker compose build
7583
- run: docker compose down -v --remove-orphans
7684
- name: Run Playwright tests
77-
run: docker compose run --rm playwright npx playwright test --fail-on-flaky-tests --trace=retain-on-failure --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
85+
run: op run --env-file=".env" -- docker compose run --rm playwright npx playwright test --fail-on-flaky-tests --trace=retain-on-failure --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
7886
- run: docker compose down -v --remove-orphans
7987
- name: Upload blob report to GitHub Actions Artifacts
8088
if: ${{ !cancelled() }}

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ up:
1010
build:
1111
op run --env-file=".env" -- docker compose build
1212

13-
.PHONY: watch up build
13+
playwright:
14+
op run --env-file=".env" -- docker compose build; \
15+
op run --env-file=".env" -- docker compose up -d --wait backend mailcatcher; \
16+
cd frontend; \
17+
op run --env-file="../.env" -- npx playwright test --fail-on-flaky-tests --trace=retain-on-failure;
18+
19+
.PHONY: watch up build playwright

0 commit comments

Comments
 (0)