mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Bumps the action-dependencies group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish). Updates `actions/checkout` from 4.2.0 to 4.2.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](d632683dd7...eef61447b9) Updates `actions/upload-artifact` from 4.4.0 to 4.4.1 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](50769540e7...604373da63) Updates `pypa/gh-action-pypi-publish` from 1.10.2 to 1.10.3 - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](897895f1e1...f7600683ef) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: action-dependencies - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch dependency-group: action-dependencies - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch dependency-group: action-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
110 lines
3.3 KiB
YAML
110 lines
3.3 KiB
YAML
on:
|
|
workflow_call:
|
|
# Permissions inherited from caller workflow
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
lint-test:
|
|
name: Lint Test
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout TUF
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
|
|
- name: Set up Python (oldest supported version)
|
|
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
|
|
with:
|
|
python-version: 3.8
|
|
cache: 'pip'
|
|
cache-dependency-path: |
|
|
requirements/*.txt
|
|
pyproject.toml
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python3 -m pip install --constraint requirements/build.txt tox coveralls
|
|
|
|
- name: Run tox
|
|
env:
|
|
RUFF_OUTPUT_FORMAT: github
|
|
run: tox -e lint
|
|
|
|
tests:
|
|
name: Tests
|
|
needs: lint-test
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
|
os: [ubuntu-latest]
|
|
include:
|
|
- python-version: "3.12"
|
|
os: macos-latest
|
|
- python-version: "3.12"
|
|
os: windows-latest
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout TUF
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: 'pip'
|
|
cache-dependency-path: |
|
|
requirements/*.txt
|
|
pyproject.toml
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python3 -m pip install --constraint requirements/build.txt tox coveralls
|
|
|
|
- name: Run tox
|
|
run: tox -e py
|
|
|
|
- name: Publish on coveralls.io
|
|
# A failure to publish coverage results on coveralls should not
|
|
# be a reason for a job failure.
|
|
continue-on-error: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
COVERALLS_FLAG_NAME: ${{ runner.os }} / Python ${{ matrix.python-version }}
|
|
COVERALLS_PARALLEL: true
|
|
# Use cp workaround to publish coverage reports with relative paths
|
|
# FIXME: Consider refactoring the tests to not require the test
|
|
# aggregation script being invoked from the `tests` directory, so
|
|
# that `.coverage` is written to and .coveragrc can also reside in
|
|
# the project root directory as is the convention.
|
|
run: |
|
|
cp tests/.coverage .
|
|
coveralls --service=github --rcfile=tests/.coveragerc
|
|
|
|
coveralls-fin:
|
|
# Always run when all 'tests' jobs have finished even if they failed
|
|
# TODO: Replace always() with a 'at least one job succeeded' expression
|
|
if: always()
|
|
needs: tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Add requirements file to make setup-python happy
|
|
run: touch requirements.txt
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
|
|
with:
|
|
python-version: '3.x'
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python3 -m pip install coveralls
|
|
|
|
- name: Finalize publishing on coveralls.io
|
|
continue-on-error: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: coveralls --finish
|