Skip to content

Commit

Permalink
Make publish depend on test
Browse files Browse the repository at this point in the history
  • Loading branch information
daniperez committed Jan 12, 2024
1 parent d2f196c commit 0f5c745
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ name: Upload Python Package
on:
push:
branches: [ "main" ]

workflow_call:
permissions:
contents: read

jobs:
tests:
uses: ./.github/workflows/tests.yml
build:
needs: [tests]
name: Build distribution 📦
environment: pypi
runs-on: ubuntu-latest
Expand All @@ -31,7 +33,7 @@ jobs:
python3 -m pip install --upgrade pip build --user
- name: Build package
run: python3 -m build
- name: Publish package
- name: Save wheels as artifacts
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Test Windows
name: Test on multiple platforms
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
Expand Down

0 comments on commit 0f5c745

Please sign in to comment.