forked from streamlit/streamlit
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (69 loc) · 2.14 KB
/
playwright.yml
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
70
71
72
73
74
75
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:
test:
runs-on: ubuntu-latest-4-cores
defaults:
run:
shell: bash --login -eo pipefail {0}
steps:
- name: Checkout Streamlit code
uses: actions/checkout@v3
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@v4
with:
python-version: "${{ env.PYTHON_MAX_VERSION }}"
- name: Setup virtual env
uses: ./.github/actions/make_init
- name: Run make develop
run: make develop
- name: Run make protobuf
run: make protobuf
- name: Run make frontend
run: make frontend-fast
- name: Run make playwright
run: make playwright
- name: Check that all screenshot have been committed
run: |
set -x;
UNTRACKED_FILE_COUNT=$(git ls-files --others --exclude-standard | grep snapshots | wc -l | bc -l || echo '0')
echo "Untracked files count: ${UNTRACKED_FILE_COUNT}"
if [[ "${UNTRACKED_FILE_COUNT}" -gt 0 ]]; then
echo "Untracked files:";
git ls-files --others --exclude-standard | grep snapshots;
exit 1;
fi
- name: Upload snapshots
uses: actions/upload-artifact@v3
if: always()
with:
name: playwright_snapshots
path: e2e/playwright/snapshots
- name: Upload failed test results
uses: actions/upload-artifact@v3
if: always()
with:
name: playwright_test_results
path: e2e/playwright/test-results