Skip to content

Commit

Permalink
Ajetaan Playwright-testit CI:ssä dockerilla
Browse files Browse the repository at this point in the history
  • Loading branch information
pretseli committed Nov 2, 2024
1 parent a5359f4 commit 9409e0e
Show file tree
Hide file tree
Showing 4 changed files with 388 additions and 9 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
lint:
timeout-minutes: 10
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -31,24 +31,22 @@ jobs:
- name: Run unit tests
run: npm test
e2e:
timeout-minutes: 60
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chromium, firefox, webkit]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-next-env
- name: Install Playwright Browsers
run: npx playwright install --with-deps ${{ matrix.browser }}
- name: Create self-signed dev certificates
run: npm run create-self-signed-dev-certs
- name: Build app
run: npm run build-test
- name: Start the app
run: npm run start-test &
- name: Run Playwright tests
run: npx playwright test --project=${{ matrix.browser }}
env:
PLAYWRIGHT_ARGS: --project=${{ matrix.browser }}
run: npm run start-and-test-playwright-docker
- uses: actions/upload-artifact@v4
if: always()
with:
Expand All @@ -58,7 +56,7 @@ jobs:
if-no-files-found: ignore
deploy-zip:
needs: [lint, test, e2e]
timeout-minutes: 30
timeout-minutes: 10
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down
Loading

0 comments on commit 9409e0e

Please sign in to comment.