Skip to content
This repository was archived by the owner on Feb 13, 2021. It is now read-only.

Commit 5b93e25

Browse files
author
Thiago C. D'Ávila
authored
Merge pull request #23 from staticdev/actions-requirements
Github Actions centralized dependencies
2 parents aa8f2b0 + 4a37edc commit 5b93e25

4 files changed

Lines changed: 39 additions & 31 deletions

File tree

.github/workflows/constraints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pip==20.1
2+
nox==2019.11.9
3+
poetry==1.0.5
4+
pre-commit==2.3.0

.github/workflows/coverage.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ jobs:
44
coverage:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/setup-python@v1
9-
with:
10-
python-version: '3.8'
11-
architecture: x64
12-
- run: pip install nox==2019.11.9
13-
- run: pip install poetry==1.0.5
14-
- run: nox --sessions tests-3.8 coverage
15-
env:
16-
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
7+
- uses: actions/checkout@v2.1.0
8+
- uses: actions/setup-python@v1.2.0
9+
with:
10+
python-version: "3.8"
11+
- run: |
12+
pip install --constraint=.github/workflows/constraints.txt pip
13+
pip install --constraint=.github/workflows/constraints.txt nox poetry
14+
- run: nox --force-color --session=tests-3.8 -- --cov --cov-report=xml
15+
- if: always()
16+
uses: codecov/codecov-action@v1.0.6

.github/workflows/release.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ jobs:
66
release:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- uses: actions/setup-python@v1
11-
with:
12-
python-version: '3.8'
13-
architecture: x64
14-
- run: pip install nox==2019.11.9
15-
- run: pip install poetry==1.0.5
16-
- run: nox
17-
- run: poetry build
18-
- run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}
9+
- uses: actions/checkout@v2.1.0
10+
- uses: actions/setup-python@v1.2.0
11+
with:
12+
python-version: "3.8"
13+
- run: |
14+
pip install --constraint=.github/workflows/constraints.txt pip
15+
pip install --constraint=.github/workflows/constraints.txt nox poetry
16+
- run: nox --force-color
17+
- run: poetry build --ansi
18+
- uses: pypa/gh-action-pypi-publish@v1.1.0
19+
with:
20+
user: __token__
21+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/tests.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ name: Tests
22
on: push
33
jobs:
44
tests:
5-
runs-on: ubuntu-latest
65
strategy:
76
matrix:
8-
python-version: ['3.7', '3.8']
9-
name: Python ${{ matrix.python-version }}
7+
os: ["ubuntu-latest", "macos-latest"]
8+
python-version: ["3.7", "3.8"]
9+
runs-on: ${{ matrix.os }}
10+
name: Python ${{ matrix.python-version }} (${{ matrix.os }})
1011
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-python@v1
13-
with:
14-
python-version: ${{ matrix.python-version }}
15-
architecture: x64
16-
- run: pip install nox==2019.11.9
17-
- run: pip install poetry==1.0.5
18-
- run: nox
12+
- uses: actions/checkout@v2.1.0
13+
- uses: actions/setup-python@v1.2.0
14+
with:
15+
python-version: ${{ matrix.python-version }}
16+
- run: |
17+
pip install --constraint=.github/workflows/constraints.txt pip
18+
pip install --constraint=.github/workflows/constraints.txt nox poetry
19+
- run: nox --force-color

0 commit comments

Comments
 (0)