Skip to content

Merge pull request #4 from mapped/fix-ci-vtl-permissions #12

Merge pull request #4 from mapped/fix-ci-vtl-permissions

Merge pull request #4 from mapped/fix-ci-vtl-permissions #12

Workflow file for this run

name: CI
on:
push:
env:
BASE_VERSION: '6.0.0'
jobs:
checks:
runs-on: ubuntu-latest
strategy:
max-parallel: 8
matrix:
check: [bluecheck, doc8, docs, flake8, isortcheck, mypy, pylint, rstcheck]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install tox
run: pip install tox
- name: Run checks
run: tox -e ${{ matrix.check }}
tests:
needs: checks
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Run tests
run: tox -e py
publish:
needs: tests
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Establish Versioning, Tags, and Labels
id: vtl
uses: mapped/action-vtl@latest
with:
baseVersion: ${{ env.BASE_VERSION }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
releasesBranch: master
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Update package version
run: |
sed -i "s/__version__ = '.*'/__version__ = '${{ steps.vtl.outputs.ver_semVerNoMetaPyPA }}'/" diskcache/__init__.py
- name: Build package
run: |
pip install build
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1