From 280a2e253ac45a891eb4916882b01f1d4f2fef8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Mon, 25 Nov 2019 12:54:32 +0100 Subject: [PATCH] Add Python 3.8 to build matrix (#58) * Add Python 3.8 to build matrix * Force pipenv to use matrix Python version * Put release step in separate job * Fix build.yml workflow --- .github/workflows/build.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5ac3a7a..c2df725d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,12 +3,12 @@ name: Build on: [push, pull_request] jobs: - build: + test: runs-on: ubuntu-latest strategy: matrix: - python_version: [3.7] + python_version: [3.7, 3.8] services: mongo: @@ -18,22 +18,37 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Set up Python 3.7 + - name: Set up Python uses: actions/setup-python@v1 with: python-version: ${{ matrix.python_version }} - name: Install dependencies run: | python -m pip install --upgrade pipenv - pipenv install --dev + pipenv install --python ${{ matrix.python_version }} --dev - name: Test with pytest env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | pipenv run pytest --cov=fastapi_users/ pipenv run codecov + + release: + runs-on: ubuntu-latest + needs: test + if: startsWith(github.ref, 'refs/tags/') + + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Install dependencies + run: | + python -m pip install --upgrade pipenv + pipenv install --dev - name: Release on PyPI - if: startsWith(github.ref, 'refs/tags/') env: FLIT_USERNAME: ${{ secrets.FLIT_USERNAME }} FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }}