Drop Python 3.7 from tox tests #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Test and Release | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run tests | |
shell: bash | |
run: | | |
set -euo pipefail | |
./test-in-docker.sh | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Get next version | |
uses: reecetech/[email protected] | |
id: version | |
with: | |
scheme: semver | |
- name: Setup Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' # Should match Pipfile / "python_version" | |
- name: Build package | |
shell: bash | |
run: | | |
set -euo pipefail | |
VERSION="${{ steps.version.outputs.version }}" | |
echo "VERSION = '${VERSION}'" > django_informixdb/version.py | |
pip install "setuptools>=62.2.0" | |
python3 setup.py sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/ | |
retention-days: 3 | |
release: | |
if: ${{ github.ref == 'refs/heads/master' }} | |
needs: | |
- test | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Get next version | |
uses: reecetech/[email protected] | |
id: version | |
with: | |
scheme: semver | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist # the name of the artefact from the `build` step | |
path: dist/ | |
- name: Release version on GitHub | |
uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
draft: false | |
prerelease: false | |
automatic_release_tag: "${{ steps.version.outputs.version }}" | |
- name: Release version on PyPi | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
print_hash: true | |
# vim: set sw=2: |