-
Notifications
You must be signed in to change notification settings - Fork 155
60 lines (57 loc) · 1.74 KB
/
test-mitosheet-python.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
name: Run pytest Mitosheet tests
on:
push:
branches: [ dev ]
paths:
- 'mitosheet/**'
pull_request:
paths:
- 'mitosheet/**'
jobs:
test-mitosheet-python:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
pandas-version: ['0.24.2', '1.1.5', '1.3.5']
optional_feature_dependencies: [False, True]
exclude:
- python-version: 3.6
pandas-version: '1.3.5'
- python-version: 3.7
pandas-version: '1.3.5'
- python-version: 3.8
pandas-version: '0.24.2'
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 }}
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: |
cd mitosheet
python -m pip install --upgrade pip
pip install "pandas==${{ matrix.pandas-version }}"
pip install -e ".[test, deploy]"
- name: Install optional feature dependencies
if: ${{ matrix.optional_feature_installs }}
run: |
cd mitosheet
pip install -e ".[optional_feature_dependencies]"
- name: Test with pytest
run: |
cd mitosheet
pytest
env:
PYTEST_SNOWFLAKE_USERNAME: ${{ secrets.PYTEST_SNOWFLAKE_USERNAME }}
PYTEST_SNOWFLAKE_PASSWORD: ${{ secrets.PYTEST_SNOWFLAKE_PASSWORD }}
PYTEST_SNOWFLAKE_ACCOUNT: ${{ secrets.PYTEST_SNOWFLAKE_ACCOUNT }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}