forked from streamlit/streamlit
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (63 loc) · 2.07 KB
/
Copy pathplaywright.yml
File metadata and controls
69 lines (63 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Playwright E2E Tests
on:
push:
branches:
- "develop"
pull_request:
types: [opened, synchronize, reopened]
# Allows workflow to be called from other workflows
workflow_call:
inputs:
ref:
required: true
type: string
# Avoid duplicate workflows on same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-playwright
cancel-in-progress: true
jobs:
playwright-e2e-tests:
runs-on: ubuntu-latest-64-cores
timeout-minutes: 30
defaults:
run:
shell: bash
steps:
- name: Checkout Streamlit code
uses: actions/checkout@v6
with:
ref: ${{ inputs.ref }}
persist-credentials: false
submodules: "recursive"
fetch-depth: 2
- name: Set Python version vars
uses: ./.github/actions/build_info
- name: Set up Python ${{ env.PYTHON_MAX_VERSION }}
uses: actions/setup-python@v6
with:
python-version: "${{ env.PYTHON_MAX_VERSION }}"
- name: Setup virtual env
uses: ./.github/actions/make_init
- name: Install playwright
uses: ./.github/actions/playwright_install
- name: Run make frontend-with-profiler
run: make frontend-with-profiler
- name: Get short SHA
id: short_sha
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "sha_short=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-6)" >> $GITHUB_OUTPUT
else
echo "sha_short=$(echo ${{ github.sha }} | cut -c1-6)" >> $GITHUB_OUTPUT
fi
- name: Run playwright tests
run: |
cd e2e_playwright
rm -rf ./test-results
pytest --ignore ./custom_components --browser webkit --browser chromium --browser firefox -n auto --reruns 1 -m "not performance"
- name: Upload failed test results
uses: actions/upload-artifact@v6
if: always()
with:
name: playwright_test_results_${{ steps.short_sha.outputs.sha_short }}
path: e2e_playwright/test-results