feat: --validate-output-json to output validation result as JSON (#536) #480
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: End-to-end Testing | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
playwright: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Local | |
storage: local | |
- name: Git | |
storage: git | |
- name: GitLab | |
storage: gitlab | |
- name: GitHub - App | |
storage: github | |
unset: TRUEWIKI_STORAGE_GITHUB_PRIVATE_KEY | |
- name: GitHub - Deploy Key | |
storage: github | |
unset: TRUEWIKI_STORAGE_GITHUB_APP_KEY | |
name: Playwright (${{ matrix.name }}) | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
cache: 'pip' | |
cache-dependency-path: | | |
e2e/requirements.base | |
requirements.txt | |
- uses: actions/cache@v4 | |
name: Cache Playwright | |
id: playwright-cache | |
with: | |
path: '~/.cache/ms-playwright' | |
key: '${{ runner.os }}-playwright' | |
- name: Set up packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r e2e/requirements.base | |
pip install -r requirements.txt | |
playwright install | |
- name: Set up remote SSH keys | |
run: | | |
mkdir -p ~/.ssh | |
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | |
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts | |
- name: Playwright (storage=${{ matrix.storage }}) | |
run: | | |
if [ -n "${{ matrix.unset }}" ]; then | |
unset ${{ matrix.unset }} | |
fi | |
COVERAGE_RCFILE="$(pwd)/.coveragerc" COVERAGE_FILE="$(pwd)/.coverage" pytest e2e -v --storage ${{ matrix.storage }} | |
coverage combine | |
coverage report -m | |
coverage xml | |
env: | |
TRUEWIKI_STORAGE_GITHUB_PRIVATE_KEY: ${{ secrets.E2E_STORAGE_GITHUB_PRIVATE_KEY }} | |
TRUEWIKI_STORAGE_GITHUB_APP_ID: ${{ secrets.E2E_STORAGE_GITHUB_APP_ID }} | |
TRUEWIKI_STORAGE_GITHUB_APP_KEY: ${{ secrets.E2E_STORAGE_GITHUB_APP_KEY }} | |
TRUEWIKI_STORAGE_GITLAB_PRIVATE_KEY: ${{ secrets.E2E_STORAGE_GITLAB_PRIVATE_KEY }} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |