-
Notifications
You must be signed in to change notification settings - Fork 9
71 lines (68 loc) · 2.36 KB
/
test_and_deploy.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
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: test
on: [push]
jobs:
test:
name: ${{ matrix.platform }} ( ${{ matrix.python-version }})
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
platform: [ubuntu-latest] #, macos-latest] # windows-latest broken for now
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up conda ${{ matrix.python-version }}
uses: conda-incubator/[email protected]
with:
auto-update-conda: true
activate-environment: test
python-version: ${{ matrix.python-version }}
channels: conda-forge
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Install pocl
if: runner.os == 'Linux'
shell: bash -l {0}
run: conda install -y pocl
- name: Install dependencies
shell: bash -l {0}
run: |
python --version
conda install -y pyopencl
python -m pip install --upgrade pip
pip install setuptools wheel pytest pytest-cov pytest-benchmark dask networkx igraph pandas PyQt5
pip install -e .
# these libraries enable testing on Qt on linux
- uses: tlambert03/setup-qt-libs@v1
- name: Test
shell: bash -l {0}
run: pytest -v --cov=./ --cov-report=xml
- name: Coverage
uses: codecov/codecov-action@v1
# deploy:
# needs: [ubuntu-latest, mac-win]
# runs-on: ubuntu-latest
# if: contains(github.ref, 'tags')
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python
# uses: actions/setup-python@v1
# with:
# python-version: "3.x"
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -U setuptools setuptools_scm wheel twine
# - name: Build and publish
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
# run: |
# git tag
# python setup.py sdist bdist_wheel
# twine upload dist/*