-
Notifications
You must be signed in to change notification settings - Fork 163
164 lines (155 loc) · 5.7 KB
/
prerelease-tests.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: Pre-release tests
on:
pull_request:
branches:
- main
jobs:
test-jupyterlab-demos:
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
matrix:
python-version: ['3.8', '3.10', '3.11']
fail-fast: false
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
mitosheet/setup.py
tests/requirements.txt
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: mitosheet/package-lock.json
- name: Install dependencies
run: |
cd tests
python3 -m venv venv
source venv/bin/activate
pip install mitosheet
pip install --upgrade -i https://test.pypi.org/simple/ mitosheet
# Install necessary node packages
jlpm install
npx playwright install chromium webkit firefox chrome
- name: Start a server and run tests
run: |
cd tests
source venv/bin/activate
jupyter lab --config jupyter_server_test_config.py &
npm run test:jupyterlab
- name: Upload test-results
uses: actions/upload-artifact@v3
if: failure()
with:
name: jupyterlab-playwright-report-${{ matrix.python-version }}
path: tests/playwright-report/
retention-days: 14
test-streamlit-demos:
timeout-minutes: 60
strategy:
matrix:
os: ['ubuntu-latest-m', 'macos-latest', 'windows-latest-l']
python-version: ['3.10']
demo: ['vanguard-fund-performance']
project: ['chromium', 'firefox', 'webkit', 'Google Chrome', 'Microsoft Edge']
exclude:
- os: 'windows-latest-l'
project: webkit
- os: 'macos-latest'
project: 'Microsoft Edge'
- os: 'ubuntu-latest-m'
project: 'Microsoft Edge'
- os: 'ubuntu-latest-m'
project: 'webkit'
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
mitosheet/setup.py
tests/requirements.txt
tests/extra-requirements.txt
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: mitosheet/package-lock.json
- name: Install dependencies (ubuntu, macos)
if: matrix.os != 'windows-latest-l'
run: |
cd tests
python3 -m venv venv
source venv/bin/activate
pip install mitosheet streamlit
pip install --upgrade -i https://test.pypi.org/simple/ mitosheet
# Install necessary node packages
jlpm install
npx playwright install chromium webkit firefox chrome
- name: Setup streamlit (ubuntu, macos)
if: matrix.os != 'windows-latest-l'
run: |
mkdir -p ~/.streamlit/
echo "[general]" > ~/.streamlit/credentials.toml
echo "email = \"\"" >> ~/.streamlit/credentials.toml
- name: Setup streamlit (windows)
if: matrix.os == 'windows-latest-l'
run: |
$streamlitDir = "$HOME\.streamlit"
if (-not (Test-Path -Path $streamlitDir)) {
New-Item -ItemType Directory -Path $streamlitDir
}
Set-Content -Path "$streamlitDir\credentials.toml" -Value @"
[general]
email = ""
"@
- name: Install dependencies (windows)
if: matrix.os == 'windows-latest-l'
run: |
cd tests
python3 -m venv venv
.\venv\Scripts\Activate.ps1
pip install mitosheet streamlit
pip install --upgrade -i https://test.pypi.org/simple/ mitosheet
# Install necessary node packages
jlpm install
npx playwright install chromium webkit firefox chrome
- name: Start a server and run tests (ubuntu, macos)
if: matrix.os != 'windows-latest-l'
run: |
cd tests
source venv/bin/activate
git clone https://github.com/mito-ds/every-feature-everywhere-all-at-once.git
cd every-feature-everywhere-all-at-once
streamlit run automation-app.py --server.port 8555 &
bash ../check_server.sh
npm run test:streamlit:demo -- --project="${{ matrix.project }}"
- name: Start a server and run tests (windows)
if: matrix.os == 'windows-latest-l'
run: |
cd tests
.\venv\Scripts\Activate.ps1
git clone https://github.com/mito-ds/every-feature-everywhere-all-at-once.git
cd every-feature-everywhere-all-at-once
Start-Job { streamlit run automation-app.py --server.port 8555 } -WorkingDirectory (Get-Location)
npm run test:streamlit:demo -- --project="${{ matrix.project }}"
- name: Upload test-results
uses: actions/upload-artifact@v3
if: always()
with:
name: streamlit-playwright-report
path: tests/playwright-report/
retention-days: 14