Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Apr 15, 2024
1 parent 1d18df2 commit a883a31
Showing 1 changed file with 35 additions and 25 deletions.
60 changes: 35 additions & 25 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,26 @@ on:

jobs:
run-tests:
name: "Playwright Tests"
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.43.0-jammy
steps:
- uses: actions/checkout@v4
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
# - name: Cache node modules
# id: cache-npm
# uses: actions/cache@v4
# env:
# cache-name: cache-node-modules
# with:
# path: ~/.npm
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-build-${{ env.cache-name }}-
# ${{ runner.os }}-build-
# ${{ runner.os }}-

# - name: Cache Playwright binaries
# uses: actions/cache@v4
Expand All @@ -32,12 +37,12 @@ jobs:
# restore-keys: |
# ${{ runner.os }}-playwright-

- name: Install dependencies
run: npm ci
# - name: Install dependencies
# run: npm ci

- name: Install Playwright
# if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium
# - name: Install Playwright
# # if: steps.playwright-cache.outputs.cache-hit != 'true'
# run: npx playwright install --with-deps chromium

- name: Start backend
env:
Expand All @@ -60,11 +65,16 @@ jobs:
- name: Run tests
run: npx playwright test
env:
BASE_URL: http://0.0.0.0:8080
DATABASE_URL: ${{ secrets.DATABASE_URL }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
HOME: /root

# - name: Run tests
# run: npx playwright test
# env:
# BASE_URL: http://0.0.0.0:8080
# DATABASE_URL: ${{ secrets.DATABASE_URL }}
# - uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }}
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30

0 comments on commit a883a31

Please sign in to comment.