Skip to content

Commit 9a978ec

Browse files
authored
Use the tests reusable workflow (#486)
1 parent c7c50ed commit 9a978ec

File tree

2 files changed

+6
-139
lines changed

2 files changed

+6
-139
lines changed

.github/workflows/actions.yml

Lines changed: 5 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -26,152 +26,18 @@ jobs:
2626
with:
2727
python-version: 3.6
2828
- name: Install tox
29-
run: |
30-
python -m pip install --upgrade tox
29+
run: python -m pip install --upgrade tox
3130
- name: Build docs with tox
32-
run: |
33-
python -m tox -e docs
34-
build_python:
35-
name: ${{ matrix.name }}
36-
runs-on: ${{ matrix.os }}
37-
strategy:
38-
matrix:
39-
include:
40-
- os: ubuntu-18.04
41-
name: py36-ubuntu
42-
python-version: 3.6
31+
run: python -m tox -e docs
4332

44-
- os: windows-latest
45-
name: py36-windows
46-
python-version: 3.6
33+
tests:
34+
uses: pytest-dev/pytest-html/.github/workflows/tests.yml@master
4735

48-
- os: macOS-latest
49-
name: py36-mac
50-
python-version: 3.6
51-
52-
- os: ubuntu-18.04
53-
name: py37-ubuntu
54-
python-version: 3.7
55-
56-
- os: windows-latest
57-
name: py37-windows
58-
python-version: 3.7
59-
60-
- os: macOS-latest
61-
name: py37-mac
62-
python-version: 3.7
63-
64-
- os: ubuntu-18.04
65-
name: py38-ubuntu
66-
python-version: 3.8
67-
68-
- os: windows-latest
69-
name: py38-windows
70-
python-version: 3.8
71-
72-
- os: macOS-latest
73-
name: py38-mac
74-
python-version: 3.8
75-
76-
- os: ubuntu-18.04
77-
name: py39-ubuntu
78-
python-version: 3.9
79-
80-
- os: windows-latest
81-
name: py39-windows
82-
python-version: 3.9
83-
84-
- os: macOS-latest
85-
name: py39-mac
86-
python-version: 3.9
87-
88-
- os: ubuntu-18.04
89-
name: pypy3-ubuntu
90-
python-version: pypy3
91-
92-
- os: windows-latest
93-
name: pypy3-windows
94-
python-version: pypy3
95-
96-
# https://github.com/pytest-dev/pytest-html/issues/482
97-
# - os: macOS-latest
98-
# name: pypy3-mac
99-
# python-version: pypy3
100-
101-
- os: ubuntu-18.04
102-
name: devel-ubuntu
103-
python-version: 3.8
104-
105-
steps:
106-
- name: Set Newline Behavior
107-
run : |
108-
git config --global core.autocrlf false
109-
- uses: actions/checkout@master
110-
- name: Set up Python
111-
uses: actions/setup-python@v2
112-
with:
113-
python-version: ${{ matrix['python-version'] }}
114-
- name: Install tox
115-
run: |
116-
python -m pip install --upgrade tox
117-
- name: Get Tox Environment Name From Matrix Name
118-
uses: rishabhgupta/split-by@v1
119-
id: split-matrix-name
120-
with:
121-
string: '${{ matrix.name }}'
122-
split-by: '-'
123-
- name: Test with tox
124-
run: |
125-
python -m tox -e ${{ steps.split-matrix-name.outputs._0}}-cov
126-
# TODO: https://github.com/pytest-dev/pytest-html/issues/481
127-
# - name: Upload coverage to codecov
128-
# if: github.event.schedule == ''
129-
# uses: codecov/codecov-action@v2
130-
# with:
131-
# fail_ci_if_error: true
132-
# file: ./coverage.xml
133-
# flags: tests
134-
# name: ${{ matrix.py }} - ${{ matrix.os }}
135-
# verbose: true
136-
build_javascript:
137-
name: grunt
138-
runs-on: ubuntu-18.04
139-
steps:
140-
- uses: actions/checkout@v2
141-
- name: Use Node.js ${{ matrix.node-version }}
142-
uses: actions/setup-node@v1
143-
with:
144-
node-version: '12.x'
145-
- name: Install Dependencies
146-
run: |
147-
npm install
148-
- name: QUnit Tests
149-
run: |
150-
npm test
151-
env:
152-
CI: true
153-
linting:
154-
name: linting
155-
runs-on: ubuntu-18.04
156-
steps:
157-
- uses: actions/checkout@master
158-
- name: Set up Python
159-
uses: actions/setup-python@v2
160-
with:
161-
python-version: 3.6
162-
- name: Install tox
163-
run: |
164-
python -m pip install --upgrade tox
165-
- name: Lint with tox
166-
run: |
167-
python -m tox -e linting
16836
publish:
16937
name: Publish to PyPI registry
17038
needs:
171-
- build_python
172-
- build_javascript
39+
- tests
17340
runs-on: ubuntu-latest
174-
17541
env:
17642
PY_COLORS: 1
17743
TOXENV: packaging

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
- os: windows-latest
6666
name: pypy3-windows
6767
python-version: pypy3
68+
6869
# https://github.com/pytest-dev/pytest-html/issues/482
6970
# - os: macOS-latest
7071
# name: pypy3-mac

0 commit comments

Comments
 (0)