-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (45 loc) · 1.17 KB
/
backend-ci.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
name: Backend CI
on:
push:
branches:
- main
paths:
- "curation-portal/**"
- "tests/**"
- "requirements.txt"
- "requirements-dev.txt"
pull_request:
paths:
- "curation-portal/**"
- "tests/**"
- "requirements.txt"
- "requirements-dev.txt"
jobs:
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Use pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Check formatting
run: black --check curation_portal tests --exclude curation_portal/migrations
- name: Run Pylint
run: pylint --disable=R --disable=C --disable=fixme curation_portal tests/*
- name: Run tests
run: pytest