-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (58 loc) · 1.4 KB
/
linting.yaml
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
name: linting
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: linting
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
# Bookend python versions
python-version: ["3.9"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Create conda environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: pyremo-linting
micromamba-version: 'latest'
environment-file: ci/requirements/environment.yml
extra-specs: |
python=${{ matrix.python-version }}
black
isort
flake8
channels: conda-forge
- name: Install pyremo
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
- name: Import pyremo
run: |
python -c "import pyremo"
- name: isort
run: isort --check .
- name: black
if: always()
run: black --check .
- name: flake8
if: always()
run: flake8 .