-
Notifications
You must be signed in to change notification settings - Fork 6
70 lines (57 loc) · 1.49 KB
/
pr-checks.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
64
65
66
67
68
69
70
name: PR checks
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
workflow_dispatch:
# Cancel previous runs of this workflow that are still in progress.
concurrency:
group: ${{ github.ref }}/checks
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
# This is required for actions/checkout
contents: read
jobs:
run_code_quality:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: radfact
environment-file: dev_environment.yaml
- name: Install repo packages
run: make setup_packages
shell: bash -el {0}
- name: Run Flake8
if: ${{ always() }}
run: make flake8
shell: bash -el {0}
- name: Run Black
if: ${{ always() }}
run: make blackcheck
shell: bash -el {0}
- name: Run Mypy
if: ${{ always() }}
run: make mypy
shell: bash -el {0}
run_pytest:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: radfact
environment-file: dev_environment.yaml
- name: Install repo packages
run: make setup_packages
shell: bash -el {0}
- name: Run pytest
run: pytest
shell: bash -el {0}