-
Notifications
You must be signed in to change notification settings - Fork 162
65 lines (63 loc) · 1.77 KB
/
test-mito-ai.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
name: Test - Mito AI
on:
push:
branches: [ dev ]
paths:
- 'mito-ai/**'
pull_request:
paths:
- 'mito-ai/**'
jobs:
test-mitoai-frontend-jupyterlab:
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
matrix:
python-version: ['3.8', '3.10', '3.11']
use-mito-ai-server: [true, false]
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: |
mito-ai/setup.py
tests/requirements.txt
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: mito-ai/package-lock.json
- name: Install dependencies
run: |
cd tests
bash mac-setup.sh
- name: Setup JupyterLab
run: |
cd tests
source venv/bin/activate
cd ../mito-ai
jupyter labextension develop . --overwrite
jupyter server extension enable --py mito-ai
- 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:mitoai
env:
OPENAI_API_KEY: ${{ matrix.use-mito-ai-server && '' || secrets.OPENAI_API_KEY }}
- name: Upload test-results
uses: actions/upload-artifact@v3
if: failure()
with:
name: mitoai-jupyterlab-playwright-report-${{ matrix.python-version }}
path: tests/playwright-report/
retention-days: 14