Skip to content

Commit 26c0cef

Browse files
committed
Streamline workflow
1 parent 3333e74 commit 26c0cef

File tree

1 file changed

+27
-30
lines changed

1 file changed

+27
-30
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ on:
1010

1111
env:
1212
FORCE_COLOR: "1" # Make tools pretty.
13-
TOX_TESTENV_PASSENV: "FORCE_COLOR"
13+
TOX_TESTENV_PASSENV: FORCE_COLOR
1414
PYTHON_LATEST: "3.10"
1515

1616

1717
jobs:
1818
tests:
19-
name: "tox on ${{ matrix.python-version }}"
20-
runs-on: "ubuntu-latest"
19+
name: tox on ${{ matrix.python-version }}
20+
runs-on: ubuntu-latest
2121

2222
strategy:
2323
fail-fast: false
2424
matrix:
2525
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy-2.7", "pypy-3.7"]
2626

2727
steps:
28-
- uses: "actions/checkout@v2"
29-
- uses: "actions/setup-python@v2"
28+
- uses: actions/checkout@v2
29+
- uses: actions/setup-python@v2
3030
with:
31-
python-version: "${{ matrix.python-version }}"
31+
python-version: ${{ matrix.python-version }}
3232

3333
- name: "Install dependencies"
3434
run: |
@@ -37,8 +37,7 @@ jobs:
3737
python -m pip install --upgrade pip setuptools wheel
3838
python -m pip install --upgrade virtualenv tox tox-gh-actions
3939
40-
- name: "Run tox targets for ${{ matrix.python-version }}"
41-
run: "python -m tox"
40+
- run: "python -m tox"
4241

4342
- name: Upload coverage data
4443
uses: "actions/upload-artifact@v2"
@@ -49,7 +48,7 @@ jobs:
4948

5049

5150
coverage:
52-
runs-on: "ubuntu-latest"
51+
runs-on: ubuntu-latest
5352
needs: tests
5453

5554
steps:
@@ -59,21 +58,20 @@ jobs:
5958
# Use latest Python, so it understands all syntax.
6059
python-version: ${{env.PYTHON_LATEST}}
6160

62-
- name: Install Coverage.py
63-
run: python -m pip install --upgrade coverage[toml]
61+
- run: python -m pip install --upgrade coverage[toml]
6462

6563
- name: Download coverage data
6664
uses: actions/download-artifact@v2
6765
with:
6866
name: coverage-data
6967

70-
- name: Combine coverage and fail if it's <100%
68+
- name: Combine coverage and fail if it's <100%.
7169
run: |
7270
python -m coverage combine
7371
python -m coverage html --skip-covered --skip-empty
7472
python -m coverage report --fail-under=100
7573
76-
- name: Upload HTML report for failed check
74+
- name: Upload HTML report if check failed.
7775
uses: actions/upload-artifact@v2
7876
with:
7977
name: html-report
@@ -82,35 +80,34 @@ jobs:
8280

8381

8482
package:
85-
name: "Build & verify package"
86-
runs-on: "ubuntu-latest"
83+
name: Build & verify package
84+
runs-on: ubuntu-latest
8785

8886
steps:
89-
- uses: "actions/checkout@v2"
90-
- uses: "actions/setup-python@v2"
87+
- uses: actions/checkout@v2
88+
- uses: actions/setup-python@v2
9189
with:
9290
python-version: ${{env.PYTHON_LATEST}}
9391

94-
- run: "python -m pip install build twine check-wheel-contents"
95-
- run: "python -m build --sdist --wheel ."
96-
- run: "ls -l dist"
97-
- run: "check-wheel-contents dist/*.whl"
98-
- name: "Check long_description"
99-
run: "python -m twine check dist/*"
92+
- run: python -m pip install build twine check-wheel-contents
93+
- run: python -m build --sdist --wheel .
94+
- run: ls -l dist
95+
- run: check-wheel-contents dist/*.whl
96+
- name: Check long_description
97+
run: python -m twine check dist/*
10098

10199

102100
install-dev:
103-
name: "Verify dev env"
104-
runs-on: "${{ matrix.os }}"
101+
name: Verify dev env
102+
runs-on: ${{ matrix.os }}
105103
strategy:
106104
matrix:
107105
os: ["ubuntu-latest", "windows-latest"]
108106

109107
steps:
110-
- uses: "actions/checkout@v2"
111-
- uses: "actions/setup-python@v2"
108+
- uses: actions/checkout@v2
109+
- uses: actions/setup-python@v2
112110
with:
113111
python-version: ${{env.PYTHON_LATEST}}
114-
- run: "python -m pip install -e .[dev]"
115-
- name: "Import package"
116-
run: "python -c 'import attr; print(attr.__version__)'"
112+
- run: python -m pip install -e .[dev]
113+
- run: python -c 'import attr; print(attr.__version__)'

0 commit comments

Comments
 (0)