-
Notifications
You must be signed in to change notification settings - Fork 50
91 lines (77 loc) · 2.61 KB
/
main.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
name: Emperor CI
# Controls when the action will run.
on:
# Triggers the workflow on pull request and push events, only on the master
# branch
pull_request:
branches: [ master ]
push:
branches: [ master ]
jobs:
# name of job
build:
# The type of runner that the job will run on (available options are window/macOS/linux)
runs-on: ubuntu-latest
# we can add more versions of node.js in the future
strategy:
matrix:
python-version: ['3.7', '3.8']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# first grab branch from github
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Node.js enviroment
uses: actions/setup-node@v1
with:
node-version: 16
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: tester
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
auto-update-conda: true
- name: Install Node.js modules
run: npm install -g jsdoc
- name: Install JS Linter
shell: bash -l {0}
run: |
conda create --yes -n gjslint python=2.7 pip six
wget https://github.com/google/closure-linter/archive/master.zip
conda run -n gjslint pip install master.zip
- name: Install Emperor
shell: bash -l {0}
run: |
conda install pip numpy 'scipy>=0.17.0' matplotlib pandas flake8 pep8 jupyter coverage cython scikit-learn requests
conda install -c conda-forge phantomjs --yes
pip install -e ".[all]"
- name: Build documentation
shell: bash -l {0}
run: |
make -C doc html
- name: Run tests and measure coverage
shell: bash -l {0}
run: |
coverage run tests/all_tests.py
coverage report
- name: Python linter
shell: bash -l {0}
run: flake8 emperor/*.py tests/*.py setup.py
- name: JS linter
shell: bash -l {0}
run: conda run -n gjslint gjslint --custom_jsdoc_tags 'module,function,constructs,alias,default' 'emperor/support_files/js/*.js' 'tests/javascript_tests/*.js'
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
coveralls_finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true