-
Notifications
You must be signed in to change notification settings - Fork 30
57 lines (52 loc) · 1.68 KB
/
cars-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
46
47
48
49
50
51
52
53
54
55
56
57
name: CARS
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install --upgrade cython numpy
pip install --upgrade numba
pip install .[dev,docs,notebook,pandora_mccnn]
pip list
- name: Unit Tests
run: |
pytest -m "unit_tests" -o log_cli=true -o log_cli_level=INFO
- name: Lint Tests
run: |
echo "Lint test"
isort --check cars tests
black --check cars tests
flake8 cars tests
pylint cars tests --rcfile=.pylintrc --output-format=parseable | tee pylint-report.txt # pipefail to propagate pylint exit code in bash
- name: Notebooks Tests
run: |
pytest -m "notebook_tests" -o log_cli=true -o log_cli_level=INFO
- name: End2end Tests
run: |
pytest -m "end2end_tests" -o log_cli=true -o log_cli_level=INFO
- name: Create source distribution
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
python -m build --sdist
- name: Publish package on pypi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}