-
Notifications
You must be signed in to change notification settings - Fork 9
117 lines (96 loc) · 3.48 KB
/
python-package.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
name: Conda package (Ubuntu Lab2 and Lab3)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
defaults:
run:
shell: bash -l {0}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: beakerx_tabledisplay
environment-file: configuration.yml
channels: conda-forge
- name: Build BeakerX tabledisplay
run: (cd beakerx_tabledisplay; pip install .)
- name: Check installation files (nbextension and lab3 extension)
run: |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay
test -f $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay/extension.js
test -f $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay/index.js
test -d $CONDA_PREFIX/share/jupyter/labextensions/@beakerx/beakerx-tabledisplay
test -f $CONDA_PREFIX/share/jupyter/labextensions/@beakerx/beakerx-tabledisplay/package.json
- name: Build wheel
run: |
cd beakerx_tabledisplay
python setup.py sdist bdist_wheel
cd dist
sha256sum * | tee SHA256SUMS
- name: Upload builds
uses: actions/upload-artifact@v2
with:
name: dist ${{ github.run_number }}
path: ./beakerx_tabledisplay/dist
tests:
runs-on: ubuntu-latest
needs: [build]
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout beakerx_base repo
uses: actions/checkout@v2
with:
repository: twosigma/beakerx_base
path: beakerx_base
- name: Checkout beakerx_tests repo
uses: actions/checkout@v2
with:
repository: twosigma/beakerx_tests
path: beakerx_tests
- uses: actions/download-artifact@v2
with:
name: dist ${{ github.run_number }}
path: ./dist
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: beakerx_tabledisplay
environment-file: configuration.yml
channels: conda-forge
- name: Install the wheel
run: |
cd dist
pip install -vv beakerx_tabledisplay*.whl
- name: Check installation files (nbextension and lab extension)
run: |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay
test -f $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay/extension.js
test -f $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay/index.js
test -d $CONDA_PREFIX/share/jupyter/labextensions/@beakerx/beakerx-tabledisplay
test -f $CONDA_PREFIX/share/jupyter/labextensions/@beakerx/beakerx-tabledisplay/package.json
- name: Check nbextension and labextension
run: |
jupyter labextension list 2>&1 | grep -ie "@beakerx/beakerx-tabledisplay.*enabled.*ok" -
- name: Run e2e tests (table v1)
shell: bash -l {0}
run: |
cd $GITHUB_WORKSPACE/beakerx_tests/autotests
chmod +x gradlew
pip install psutil
python ci_tests.py --app=lab --tbl=v1 --exp=yes --tst=python.Table*
- name: Archive screenshot results
uses: actions/upload-artifact@v1
if: always()
with:
name: screenshots
path: ${{ github.workspace }}/beakerx_tests/autotests/resources/img/python