Skip to content

Scheduled daily dependency update on Saturday #220

Scheduled daily dependency update on Saturday

Scheduled daily dependency update on Saturday #220

Workflow file for this run

name: Continuous Integration
env:
TERM: screen-256color
on:
pull_request:
branches: ["master", "main"]
paths-ignore: ["docs/**"]
push:
branches: ["master", "main"]
paths-ignore: ["docs/**"]
tags:
- "v*"
jobs:
# Runs all steps on the VM
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-10.15, windows-2019]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']
steps:
- name: Checkout Code Repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
pip install codecov
- name: "Run tox targets for Python ${{ matrix.python-version }} on ${{ matrix.os }}"
run: |
tox
- name: Upload Coverage to Codecov
uses: "codecov/codecov-action@v2"
with:
fail_ci_if_error: true
# Runs all steps on the VM
# Deploy to PyPI & create a GitHub Release when the test job succeeds, and only on pushes to tags.
deploy:
needs: test
if: needs.test.result == 'success' && startsWith( github.ref, 'refs/tags/v' )
runs-on: ubuntu-20.04
steps:
- name: Checkout Code Repository
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Build Package
run: |
invoke dist
# - name: Publish 🐍 distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
- name: Publish 🐍 distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
- name: Get the version
id: get_version
run: |
echo "${{ github.ref }}"
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Generate Release Title
id: get_release_title
shell: bash
run: |
export TODAY="($(TZ=Africa/Lusaka date --iso))"
echo ::set-output name=RELEASE_NAME::"${{ steps.get_version.outputs.VERSION }} $TODAY"
- name: Extract Release Notes
# This creates a file LATEST_RELEASE_NOTES.md in the parent directory (../)
run: |
invoke get-release-notes
- name: GitHub Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.get_release_title.outputs.RELEASE_NAME }}
body_path: ../LATEST_RELEASE_NOTES.md
files: dist/*