Skip to content

Bump the everything-else group in /python with 4 updates #664

Bump the everything-else group in /python with 4 updates

Bump the everything-else group in /python with 4 updates #664

Workflow file for this run

name: Python 🐍🐍🐍 Tests 🦂
on:
push:
branches-ignore:
- 'main'
paths:
- 'python/**'
- '!python/**.md'
- '!python/.vscode/**'
- '.github/workflows/python-*'
pull_request:
branches:
- 'main'
paths:
- 'python/**'
- '!python/**.md'
- '!python/.vscode/**'
- '.github/workflows/python-*'
schedule: # 9AM on the 15th
- cron: 0 22 14 1,2,3,10,11,12 * # AEDT Months
- cron: 0 23 14 4,5,6,7,8,9 * # AEST Months
workflow_call:
permissions: {}
defaults:
run:
shell: bash
working-directory: python
env:
development_python_version: 3.10.12
jobs:
quick-test:
name: Python 🐍🐍🐍 Quick Test 🦂
if: ${{ github.event_name == 'push' && !(github.event.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 🐍🐍🐍 Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ env.development_python_version }}
- name: 🧱 Install build dependencies
run: make venv
- name: 🦂 Test with pytest
run: make test
- name: 🧹 Lint
run: make lint
- name: ⚖ Does the checked source match the built result?
run: make verify_built_checkin
full-test:
name: Python 🐍🐍🐍 Full Test 🦂
if: >-
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') }}
runs-on: '${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- name: 🏁 Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 🐍🐍🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: 🧱 Install build dependencies
run: make venv
- name: 🦂 Test with pytest
run: make tox
- name: 🧹 Lint
run: make lint
- name: ⚖ Does the checked source match the built result?
run: make verify_built_checkin
built-example:
name: Python 🐍🐍🐍 Build Example 🦛
if: >-
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 🐍🐍🐍 Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ env.development_python_version }}
- name: 🧱 Install build dependencies
run: make venv
- name: 🧱 Build
run: make build
- name: 🆙 Upload dists
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Package
path: python/dist/collatz-*-none-any.whl
if-no-files-found: error
retention-days: 1
usage-demonstration:
name: Python 🐍🐍🐍 Usage Demonstration 🦏
needs: [built-example]
if: >-
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: python/.demo
steps:
- name: 🏁 Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 🐍🐍🐍 Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ env.development_python_version }}
- name: 🆒 Download dists
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: Package
path: python/.demo
- name: 🦛 Install this package
run: make install
- name: 🦏 Run usage demonstration
run: make demo
codeql:
name: Python 🐍🐍🐍 CodeQL 🛡👨‍💻🛡
if: >-
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') }}
permissions:
actions: read
contents: read
security-events: write
uses: ./.github/workflows/github-codeql.yaml
with:
language: 'python'
docs:
name: Python 🐍🐍🐍 Docs 📄 Quick Test 🦂
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 🐍🐍🐍 Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ env.development_python_version }}
- name: 🧱 Install build dependencies
run: make venv
- name: 📄 Docs
run: make docs