Skip to content

Bump actions/checkout from 7.0.0 to 7.0.1 #226

Bump actions/checkout from 7.0.0 to 7.0.1

Bump actions/checkout from 7.0.0 to 7.0.1 #226

Workflow file for this run

name: CI/CD
on:
push:
pull_request:
jobs:
lint:
name: Lint
if: github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: '3.12'
- name: Install tox
run: pip install tox
- name: Run pycodestyle
run: tox
env:
TOXENV: pycodestyle
test:
name: Test Python ${{ matrix.python }} on ${{ matrix.os }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
strategy:
fail-fast: false
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python }}
- name: Install tox
run: pip install tox
- name: Compute TOXENV
id: toxenv
run: echo "toxenv=py$(tr -d . <<< ${{ matrix.python }})" >> $GITHUB_OUTPUT
shell: bash
- name: Run tests
run: tox
env:
TOXENV: ${{ steps.toxenv.outputs.toxenv }}
- name: Upload coverage to Codecov
if: ${{ !(github.event_name == 'push' && github.event.repository.fork) }}
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5
with:
env_vars: OS,PYTHON
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
publish:
name: Publish
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && !github.event.repository.fork
needs: [lint, test]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: '3.12'
- name: Create package
run: |
python -m pip install build
python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0