Add initial tests for output=minimal
and output=embed
#29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Playwright Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code under test | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
path: 'helioviewer.org' | |
- name: Checkout the latest Helioviewer API | |
uses: actions/checkout@v4 | |
with: | |
repository: 'Helioviewer-Project/api' | |
path: 'api' | |
# See https://github.com/actions/checkout?tab=readme-ov-file#fetch-only-a-single-file | |
- name: Checkout the Dockerfile for local Helioviewer | |
uses: actions/checkout@v4 | |
with: | |
repository: 'Helioviewer-Project/helioviewer.org-docker' | |
path: 'compose' | |
sparse-checkout: | | |
compose.yaml | |
sparse-checkout-cone-mode: false | |
- name: Print current directory | |
run: | | |
echo $(pwd) | |
echo $(ls) | |
- name: Make writeable configuration files | |
run: | | |
touch api/install/settings/settings.cfg | |
chmod o+rw api/install/settings/settings.cfg | |
touch api/settings/Config.ini | |
chmod o+rw api/settings/Config.ini | |
touch api/settings/Config.php | |
chmod o+rw api/settings/Config.php | |
- name: Start local Helioviewer environment | |
id: docker | |
run: | | |
mv compose/compose.yaml . | |
docker compose up -d --wait | |
- name: Show docker compose logs | |
if: always() | |
run: | | |
docker compose logs | |
cat compose.yaml | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install Playwright Browsers | |
run: | | |
cd helioviewer.org | |
npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: | | |
cd helioviewer.org | |
npx playwright test | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: helioviewer.org/playwright-report/ | |
retention-days: 30 |