forked from DLR-VF/PtAC
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (58 loc) · 1.65 KB
/
ci-linux.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
name: Test PtAC with Mamba in Linux
on:
push:
branches: [ master, dev ]
tags:
- "v*.*.*"
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Python ${{ matrix.python-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
os: [ubuntu-latest]
include:
- os: ubuntu-latest
environment-file: .github/build_environments/environment-linux.yml
miniforge-variant: Mambaforge
miniforge-version: 4.9.2-4
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Setup conda environment with mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
use-mamba: true
activate-environment: ptac-dev
python-version: ${{ matrix.python-version }}
condarc-file: ${{ matrix.condarc-file }}
environment-file: ${{ matrix.environment-file }}
miniforge-variant: ${{ matrix.miniforge-variant }}
miniforge-version: ${{ matrix.miniforge-version }}
- name: Install PtAC
run: |
python setup.py install
conda list
conda info --all
- name: Lint code
shell: bash -l {0}
run: |
isort .
black .
flake8 .
pydocstyle . --ignore=D104,D100,D103,D212
- name: Test code
shell: bash -l {0}
run: |
pytest -v