Skip to content

Commit

Permalink
Fix redis url in playwright workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaHydrae committed Sep 29, 2024
1 parent 774beb3 commit 737dfd6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,36 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4
- uses: actions/setup-node@v4

# https://github.com/asdf-vm/actions#setup
- name: Install asdf
uses: asdf-vm/actions/setup@v3
with:
node-version: lts/*
asdf_branch: v0.14.1

- name: Install Node.js with asdf
run: |
asdf plugin add nodejs
asdf install nodejs
- name: Install dependencies
run: npm ci

- name: Build the application
run: npm run build

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Playwright tests
run: npx playwright test
env:
BIG_BROWSER_DATABASE_URL: redis://redis:6379/1
BIG_BROWSER_PORT: 3001

# https://github.com/actions/upload-artifact
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
5 changes: 3 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ export default defineConfig({
url: 'http://127.0.0.1:3001',
reuseExistingServer: !process.env['CI'],
env: {
BIG_BROWSER_DATABASE_URL: 'redis://localhost:6379/1',
BIG_BROWSER_PORT: '3001'
BIG_BROWSER_DATABASE_URL:
process.env['BIG_BROWSER_DATABASE_URL'] ?? 'redis://localhost:6379/1',
BIG_BROWSER_PORT: process.env['BIG_BROWSER_PORT'] ?? '3001'
}
}
});

0 comments on commit 737dfd6

Please sign in to comment.