Bump github/codeql-action from 3.25.15 to 3.26.0 #362
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.github/**' | |
- '.pre-commit-config.yaml' | |
pull_request: | |
permissions: read-all | |
env: | |
POETRY_VERSION: "1.8.2" | |
MIN_PYTHON_VERSION: "3.8" | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 | |
with: | |
python-version: ${{ env.MIN_PYTHON_VERSION }} | |
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | |
tests: | |
needs: pre-commit | |
name: ${{ matrix.os }} / ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
experimental: [false] | |
include: | |
- os: ubuntu-latest | |
python-version: "3.13-dev" | |
experimental: true | |
fail-fast: false | |
continue-on-error: ${{ matrix.experimental }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up poetry ${{ env.POETRY_VERSION }} | |
run: pip install poetry==${{ env.POETRY_VERSION }} | |
- name: Install dependencies | |
run: poetry install | |
- name: Install pytest plugin | |
run: poetry run pip install pytest-github-actions-annotate-failures | |
- name: Run pytest | |
run: poetry run python -m pytest tests/ | |
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' | |
name: Create coverage report | |
run: | | |
poetry run pip install pytest-cov | |
poetry run python -m pytest -s --cov=pycep --cov-report=lcov tests/ | |
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' && github.repository == 'gruebel/pycep' | |
name: Upload coverage to coveralls | |
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' && github.repository == 'gruebel/pycep' | |
name: Upload coverage to codecov | |
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 | |
with: | |
flags: unittests | |
fail_ci_if_error: false | |
publish: | |
if: github.event_name == 'push' | |
needs: tests | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
contents: write | |
# IMPORTANT: this permission is mandatory for trusted publishing to pypi | |
id-token: write | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 | |
with: | |
python-version: ${{ env.MIN_PYTHON_VERSION }} | |
- name: Set up poetry ${{ env.POETRY_VERSION }} | |
run: pip install poetry==${{ env.POETRY_VERSION }} | |
- name: Install dependencies | |
run: poetry install --no-dev | |
- name: Bump prerelease version | |
run: | | |
# bump version | |
poetry version prerelease | |
new_version=$(poetry version -s) | |
# commit and push | |
git config --global user.name 'gruebel' | |
git config --global user.email '[email protected]' | |
git add pyproject.toml | |
git commit -m "publish version ${new_version}" | |
git push | |
- name: Build Python package | |
run: poetry build | |
- name: Publish prerelease to PyPI | |
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0 |