obsidian-testing-framework/.github/workflows/playwright.yml

39 lines
1.2 KiB
YAML
Raw Normal View History

2024-10-22 18:33:44 -04:00
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
2024-10-23 18:16:04 -04:00
- name: Install dependencies
2024-10-23 03:15:06 -04:00
run: |
apt-get update
2024-10-23 14:59:33 -04:00
apt-get install -y jq xdg-utils xvfb
2024-10-23 03:15:06 -04:00
curled=$(curl -L https://github.com/obsidianmd/obsidian-releases/raw/refs/heads/master/desktop-releases.json | jq .latestVersion | sed s/\"//g)
curl -Lo obsidian.deb "https://github.com/obsidianmd/obsidian-releases/releases/download/v$curled/obsidian_${curled}_amd64.deb"
corepack enable
yarn install
cd packages/test-project
2024-10-23 16:46:00 -04:00
yarn playwright install-deps
2024-10-23 03:15:06 -04:00
dpkg -i ../../obsidian.deb
2024-10-23 04:19:07 -04:00
- name: compile and test!
2024-10-23 18:16:04 -04:00
env:
XDG_CONFIG_HOME: /root/.config
2024-10-23 04:19:07 -04:00
run: |
2024-10-23 03:15:06 -04:00
yarn workspace obsidian-testing-framework run tsc
2024-10-23 14:59:33 -04:00
yarn workspace obsidian-sample-plugin run test
2024-10-22 18:33:44 -04:00
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30