Skip to content

Updating-Changelog-and-version #48

Updating-Changelog-and-version

Updating-Changelog-and-version #48

Workflow file for this run

name: CI Workflow
on:
push:
branches:
- main
tags:
- rel/**
pull_request:
branches:
- main
permissions: read-all
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10.14'
- name: Install dev dependencies
run: pip install -r requirements-dev.txt
- name: Run pre-commit linting
run: pre-commit run --all-files
system-tests:
name: System Tests
runs-on: windows-latest
needs: [tests,lint]
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/rel/'))
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install test dependencies
run: pip install -r requirements-test.txt
- name: Run system tests with tox
run: tox -e system_tests
env:
DAR_CLIENT_ID: ${{ secrets.DAR_CLIENT_ID }}
DAR_CLIENT_SECRET: ${{ secrets.DAR_CLIENT_SECRET }}
DAR_AUTH_URL: ${{ secrets.DAR_AUTH_URL }}
DAR_URL: ${{ secrets.DAR_URL }}
- name: Create Github Release for Tag
if: startsWith(github.ref, 'refs/tags/rel/')
uses: softprops/action-gh-release@v2
with:
body: "Tagging release ${{ github.ref }}"
files: system_test_results/traceability.html
tests:
name: Tests on Linux, Windows and macOS environments
runs-on: ${{ matrix.os}}
strategy:
matrix:
include:
- python-version: '3.10'
toxenv: 'py310-cov'
os: ubuntu-latest
- python-version: '3.11'
toxenv: 'py311-cov'
os: ubuntu-latest
- python-version: 'pypy3.10'
toxenv: 'pypy3-cov'
os: ubuntu-latest
- python-version: '3.10'
toxenv: 'py310-cov'
os: windows-latest
- python-version: '3.10'
toxenv: 'py310-cov'
os: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: pip install -r requirements-test.txt
- name: Run tests with tox
run: tox -e ${{ matrix.toxenv }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
name: Deploy to PyPI
runs-on: ubuntu-latest
needs: [system-tests]
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/rel/')
permissions:
contents: read
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build distributions
run: pipx run build --sdist --wheel
- name: Deploy release to PyPI
uses: pypa/gh-action-pypi-publish@release/v1 # Uses OIDC/Workload identities and doesn't require a token