Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Aug 17, 2024
1 parent 5f22003 commit 120850f
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ on:
- main

jobs:
build:
check-package:
name: Build & inspect our package.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
test:
needs: [check-package]
runs-on: ${{ matrix.os }}

strategy:
Expand Down Expand Up @@ -87,9 +97,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Download built packages from the build-package job.
uses: actions/download-artifact@v4
with:
fetch-depth: 0

name: Packages
path: dist
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
Expand All @@ -102,11 +114,11 @@ jobs:
- name: Test without coverage
if: "! matrix.use_coverage"
run: "tox -e ${{ matrix.tox_env }}"
run: "tox -e ${{ matrix.tox_env }} --installpkg dist/*.whl"

- name: Test with coverage
if: "matrix.use_coverage"
run: "tox -e ${{ matrix.tox_env }}-coverage"
run: "tox -e ${{ matrix.tox_env }}-coverage --installpkg dist/*.whl"

- name: Upload coverage
if: matrix.use_coverage && github.repository == 'pytest-dev/pluggy'
Expand All @@ -118,26 +130,16 @@ jobs:
verbose: true

deploy:
needs: [check-package]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pluggy'
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
- name: Download built packages from the build-package job.
uses: actions/download-artifact@v4
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade build
- name: Build package
run: python -m build --sdist --wheel --outdir dist/

name: Packages
path: dist
- name: Publish package
uses: pypa/[email protected]

0 comments on commit 120850f

Please sign in to comment.