name: Continuous Integration on: push: pull_request: jobs: unit-tests: name: Test on Python v${{ matrix.python-version }} runs-on: ubuntu-latest strategy: matrix: python-version: [3.4, 3.5, 3.6, 3.7, 3.8, 3.9] steps: - name: Checkout the repository uses: actions/checkout@v2 with: persist-credentials: false - name: Install build essentials run: sudo apt-get --yes install build-essential - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | pip install pip==19.0.3 pipenv==2018.11.26 pipenv install --dev - run: pipenv run tests - run: pipenv run tests-coverage publish-release: name: Publish the release if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest steps: - name: Checkout the repository uses: actions/checkout@v2 with: persist-credentials: false - name: Install build essentials run: sudo apt-get --yes install build-essential - name: Set up Python uses: actions/setup-python@v2 - name: Install dependencies run: | pip install pip==19.0.3 pipenv==2018.11.26 pipenv install --dev - name: Create the distribution run: pipenv run python setup.py build sdist - name: Publish the distribution uses: pypa/gh-action-pypi-publish@master with: user: __token__ password: ${{ secrets.PYPI_PASSWORD }} - name: Create the release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }}