-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 1.24 KB
/
pull_request.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
name: Test and Lint RO-Crate generation
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: isort - check import formatting
run: poetry run python -m isort --check --diff --profile black src/
- name: Black - check code formatting
run: poetry run python -m black --check --diff .
- name: pytest - run the tests
run: poetry run python -m pytest -v --cov=src/ tests/
- name: pylint - static code analysis
run: poetry run python -m pylint --rcfile .pylintrc src/
- name: mypy - load types
run: poetry run mypy --install-types --non-interactive
- name: mypy - static type checking
# Takes configuration from pyproject.toml
run: poetry run python -m mypy
#add safety and bandit back in!!!!dfpaj'f