-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (42 loc) · 1.4 KB
/
test_learnware_with_source.yaml
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
name: Test learnware
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
timeout-minutes: 120
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: [3.9]
steps:
- name: Test learnware from pip
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Create conda env for macos
run: |
conda create -n learnware python=${{ matrix.python-version }}
- name: Update pip to the latest version
run: |
conda run -n learnware python -m pip install --upgrade pip
conda run -n learnware python -m pip install flake8 pytest
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
conda run -n learnware python -m flake8 . --ignore=E203,E501,F841,W503
- name: Install learnware
run: |
conda run -n learnware python -m pip install .[full]
- name: Test workflow
run: |
conda run -n learnware python -m pytest tests/test_workflow/test_hetero_workflow.py