-
Notifications
You must be signed in to change notification settings - Fork 5
108 lines (92 loc) · 2.78 KB
/
ci-build.yml
File metadata and controls
108 lines (92 loc) · 2.78 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: CI
on:
pull_request:
branches:
- master
jobs:
build:
name: Run Unit Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.8]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Report WPS Errors
uses: wemake-services/wemake-python-styleguide@0.14.1
continue-on-error: true
with:
reporter: 'github-pr-review'
path: './sp-validation'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Conda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: Check Conda
shell: bash -l {0}
run: |
conda info
conda list
python --version
- name: Install Dependencies
shell: bash -l {0}
run: |
python --version
python -m pip install --upgrade pip
python -m pip install -r develop.txt
python -m pip install -r docs/requirements.txt
python -m pip install twine
python -m pip install .
- name: Run Tests
shell: bash -l {0}
run: |
pip list
python setup.py test
- name: Save Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: unit-test-results-${{ matrix.os }}-${{ matrix.python-version }}
path: pytest.xml
- name: Check Distribution
shell: bash -l {0}
run: |
python setup.py sdist
twine check dist/*
- name: Check API Documentation build
shell: bash -l {0}
run: |
conda install -c conda-forge pandoc
sphinx-apidoc -t docs/_templates -feTMo docs/source sp_validation
sphinx-build -b doctest -E docs/source docs/_build
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: unittests
test-results:
name: Deploy Test Results
needs: build
runs-on: ubuntu-latest
if: success() || failure()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: unit-test-results-ubuntu-latest-3.8
path: artifacts
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1.5
with:
check_name: Unit Test Report
github_token: ${{ secrets.GITHUB_TOKEN }}
report_individual_runs: true
files: artifacts/pytest.xml