Skip to content

🚀 Deploy package to PyPI #17

🚀 Deploy package to PyPI

🚀 Deploy package to PyPI #17

Workflow file for this run

name: Deploy package to PyPI
on:
push:
branches: [ master ]
paths:
- musify/**
pull_request_target:
branches: [ master ]
paths:
- musify/**
workflow_dispatch:
permissions:
contents: read
jobs:
test_windows:
name: Run tests - Windows 🪟
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
- name: Run tests
run: |
pytest --junit-xml=test-results.xml
- name: Publish test results report
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results - Windows 🪟
test_linux:
name: Run tests - Linux 🐧
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
- name: Run tests
run: |
pytest --junit-xml=test-results.xml
- name: Publish test results report
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results - Linux 🐧
test_mac:
name: Run tests - Mac 🍎
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
- name: Run tests
run: |
pytest --junit-xml=test-results.xml
- name: Publish test results report
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results - Mac 🍎
build:
runs-on: ubuntu-latest
needs: [test_windows, test_linux, test_mac]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Build package
run: |
hatchling build
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip