-
-
Notifications
You must be signed in to change notification settings - Fork 49
87 lines (81 loc) · 2.66 KB
/
main.yml
File metadata and controls
87 lines (81 loc) · 2.66 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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allow rebuilds via API.
repository_dispatch:
types: rebuild
jobs:
pre-commit:
name: "Pre-commit"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
- name: Locally install interrogate
run: python -m pip install .
- name: Run pre-commit
uses: pre-commit/action@v2.0.3
tests:
name: "Python ${{ matrix.python-version }} on Ubuntu"
runs-on: "ubuntu-latest"
env:
USING_COVERAGE: '3.7,3.8,3.9,3.10.0-rc.2'
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10.0-rc.2"]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v3"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade virtualenv tox tox-gh-actions
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox"
- name: "Upload coverage to Codecov"
if: "contains(env.USING_COVERAGE, matrix.python-version)"
uses: "codecov/codecov-action@v2.0.3"
with:
file: ./coverage.xml
fail_ci_if_error: true
package:
name: "Build & Verify Package on Ubuntu"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v3"
with:
python-version: "3.8"
- name: "Install pep517 and twine"
run: "python -m pip install pep517 twine"
- name: "Build package"
run: "python -m pep517.build --source --binary ."
- name: "List result"
run: "ls -l dist"
- name: "Check long_description"
run: "python -m twine check dist/*"
install-dev:
name: "Verify Dev Env on ${{ matrix.os }}"
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: "${{ matrix.os }}"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v3"
with:
python-version: "3.8"
- name: "Install in dev mode"
run: "python -m pip install -e .[dev]"
- name: "Import package"
run: "python -c 'import interrogate; print(interrogate.__version__)'"