diff --git a/.github/workflows/constraints.txt b/.github/workflows/constraints.txt new file mode 100644 index 0000000..9b28087 --- /dev/null +++ b/.github/workflows/constraints.txt @@ -0,0 +1,4 @@ +pip==20.1 +nox==2019.11.9 +poetry==1.0.5 +pre-commit==2.3.0 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 9e0521b..1f47aad 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -4,13 +4,13 @@ jobs: coverage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: x64 - - run: pip install nox==2019.11.9 - - run: pip install poetry==1.0.5 - - run: nox --sessions tests-3.8 coverage - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} + - uses: actions/checkout@v2.1.0 + - uses: actions/setup-python@v1.2.0 + with: + python-version: "3.8" + - run: | + pip install --constraint=.github/workflows/constraints.txt pip + pip install --constraint=.github/workflows/constraints.txt nox poetry + - run: nox --force-color --session=tests-3.8 -- --cov --cov-report=xml + - if: always() + uses: codecov/codecov-action@v1.0.6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85d6279..7472bec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,13 +6,16 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: x64 - - run: pip install nox==2019.11.9 - - run: pip install poetry==1.0.5 - - run: nox - - run: poetry build - - run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }} + - uses: actions/checkout@v2.1.0 + - uses: actions/setup-python@v1.2.0 + with: + python-version: "3.8" + - run: | + pip install --constraint=.github/workflows/constraints.txt pip + pip install --constraint=.github/workflows/constraints.txt nox poetry + - run: nox --force-color + - run: poetry build --ansi + - uses: pypa/gh-action-pypi-publish@v1.1.0 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a21e1e3..fbb7b73 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,17 +2,18 @@ name: Tests on: push jobs: tests: - runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8'] - name: Python ${{ matrix.python-version }} + os: ["ubuntu-latest", "macos-latest"] + python-version: ["3.7", "3.8"] + runs-on: ${{ matrix.os }} + name: Python ${{ matrix.python-version }} (${{ matrix.os }}) steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - - run: pip install nox==2019.11.9 - - run: pip install poetry==1.0.5 - - run: nox + - uses: actions/checkout@v2.1.0 + - uses: actions/setup-python@v1.2.0 + with: + python-version: ${{ matrix.python-version }} + - run: | + pip install --constraint=.github/workflows/constraints.txt pip + pip install --constraint=.github/workflows/constraints.txt nox poetry + - run: nox --force-color