-
Notifications
You must be signed in to change notification settings - Fork 51
92 lines (74 loc) · 2.39 KB
/
unit.yaml
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
name: Unit tests and release
on:
push:
branches: [ master ]
tags:
- '*'
pull_request:
branches: [ master ]
jobs:
unit_tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.8, 3.11.0, pypy-3.6]
os: [ubuntu-20.04]
include:
- os: windows-latest
python-version: 3.6
- os: macos-latest
python-version: 3.6
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip tox
- name: Log system information
run: |
test -r /etc/os-release && sh -c '. /etc/os-release && echo "OS: $PRETTY_NAME"'
python --version
python -c "print('\nENVIRONMENT VARIABLES\n=====================\n')"
python -c "import os; [print(f'{k}={v}') for k, v in os.environ.items()]"
- name: Run unit tests
run: |
tox -e test
- name: Run unit tests with latest Twisted version
if: matrix.python-version != '3.7' && matrix.python-version != '3.6' && matrix.python-version != 'pypy-3.6'
run: |
tox -e test-latest-twisted
- name: Publish code coverage
continue-on-error: true
run: |
tox -e codecov
release:
needs: [unit_tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Log system information
run: |
test -r /etc/os-release && sh -c '. /etc/os-release && echo "OS: $PRETTY_NAME"'
python --version
python -c "print('\nENVIRONMENT VARIABLES\n=====================\n')"
python -c "import os; [print(f'{k}={v}') for k, v in os.environ.items()]"
- name: Install deps
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Build pydoctor
run: |
python setup.py --quiet build check sdist bdist_wheel
ls -alh ./dist/
- name: Publish pydoctor to PyPI on tags
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}