-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (60 loc) · 1.69 KB
/
dev_tests.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
name: SOPRANO (Dev) Tests
on:
push:
branches:
- python-dev
pull_request:
branches:
- python-dev
jobs:
lint:
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.11"]
name: lint with python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install ruff and black
run: |
python -m pip install --upgrade pip
pip install ruff black
- name: Lint check with ruff
run: |
ruff --format=github --target-version=py311 --line-length 79 .
- name: Style check with black
run: |
black ./ --check --line-length 79
test:
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.11"]
name: test with python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: src/SOPRANO/local.yml
init-shell: bash
- name: Install SOPRANO
shell: bash -l {0}
run: |
micromamba activate soprano-dev
pip install -e .[ci]
- name: Test conda environment
shell: bash -l {0}
run: |
micromamba activate soprano-dev
pytest tests/test_configuration
- name: Test units
shell: bash -l {0}
run: |
micromamba activate soprano-dev
pytest tests/test_units