Repository navigation
61 lines (51 loc) · 1.63 KB
/
Copy pathtest_package.yml
File metadata and controls
61 lines (51 loc) · 1.63 KB
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
name: test, package
on: [push, pull_request_target]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
# max-parallel: 6
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
# if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade --user pip
pip install setuptools
python --version
pip --version
pip list
- name: Lint and Tests
run: |
pip install -e .[testing]
python -c 'import brainmatch'
flake8 . --count --statistics
coverage run --source brainmatch -m pytest -o junit_family=xunit2 -v --doctest-modules --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@main
with:
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: always()
- name: Statistics
if: success()
run: |
coverage report
- name: Package Setup
run: |
pip install build
# check-manifest
python -m build
# twine check dist/*