Skip to content

Bump pytest from 7.4.2 to 7.4.3 #1767

Bump pytest from 7.4.2 to 7.4.3

Bump pytest from 7.4.2 to 7.4.3 #1767

Workflow file for this run

name: build
on:
push:
release:
types: [created, published]
env:
python-version: '3.12'
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: ${{ env.python-version }}
- name: Lint with pre-commit
uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # v3.0.0
- name: Check Poetry lock file integrity
run: |
pipx install --python python${{ env.python-version }} --pip-args=--constraint=.github/constraints.txt poetry
poetry config virtualenvs.in-project true
poetry check
build:
needs: lint
runs-on: ubuntu-22.04
permissions:
contents: write
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
gtk-version: ['3.0', '4.0']
name: build (python ${{ matrix.python-version }}, gtk ${{ matrix.gtk-version }})
outputs:
targz: gaphas-${{ steps.meta.outputs.version }}.tar.gz
wheel: gaphas-${{ steps.meta.outputs.version }}-py3-none-any.whl
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Use Python Dependency Cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Ubuntu Dependencies
run: |
sudo apt update -qq
sudo apt install -qq --no-install-recommends gir1.2-gtk-${{ matrix.gtk-version }} libgirepository1.0-dev
- name: Install Poetry
run: |
pipx install --python python${{ matrix.python-version }} --pip-args=--constraint=.github/constraints.txt poetry
poetry config virtualenvs.in-project true
- name: Collect Project Data
id: meta
run: .github/scripts/metadata.sh
- name: Install dependencies
run: poetry install --no-interaction
- name: Test
run: TEST_GTK_VERSION=${{ matrix.gtk-version }} xvfb-run poetry run pytest --cov=gaphas
- name: Code Climate Coverage Action
uses: paambaati/codeclimate-action@4cace242c6e0a2dd554bbb3cc12c58047d8af3e5 # v5.0.0
env:
CC_TEST_REPORTER_ID: 195e9f83022747c8eefa3ec9510dd730081ef111acd99c98ea0efed7f632ff8a
with:
coverageCommand: poetry run coverage xml
- name: Create Source Dist and Wheel
if: ${{ matrix.python_version == env.python_version }}
run: poetry build
- name: Upload gaphas-${{ steps.meta.output.version }}.tar.gz
if: ${{ matrix.python_version == env.python_version }}
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: gaphas-${{ steps.meta.outputs.version }}.tar.gz
path: dist/gaphas-${{ steps.meta.outputs.version }}.tar.gz
- name: Upload gaphas-${{ steps.meta.outputs.version }}-py3-none-any.whl
if: ${{ matrix.python_version == env.python_version }}
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: gaphas-${{ steps.meta.outputs.version }}-py3-none-any.whl
path: dist/gaphas-${{ steps.meta.outputs.version }}-py3-none-any.whl
publish-to-pypi:
name: Publish to PyPI (release only)
needs: build
runs-on: ubuntu-22.04
permissions:
id-token: write
if: ${{ github.event_name == 'release' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: ${{ needs.build.outputs.targz }}
path: dist
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: ${{ needs.build.outputs.wheel }}
path: dist
- uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # release/v1