forked from TomTranter/JellyBaMM
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.51 KB
/
test_on_push.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: pybamm_pnm
on:
push:
branches:
pull_request:
branches:
schedule:
- cron: '0 3 * * *'
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Lint with flake8
run: |
python -m pip install --upgrade pip
python -m pip install flake8
flake8
build:
needs: style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install specific version of PyBaMM and liionpack
run: |
pip install wheel
python -m pip install git+https://github.com/pybamm-team/pybamm@develop
pybamm_install_jax
python -m pip install git+https://github.com/pybamm-team/liionpack@develop
- name: Install pybamm_pnm with dependencies
run: |
pip install wheel
pip install openpnm==2.8.2
python -m pip install -e .
- name: Install latest sympy
run: |
python -m pip install sympy==1.10.1
- name: Run tests and generate coverage report
run: |
python -m pip install coverage
coverage run -m unittest -v