chore: Use the same actions for test and release pipeline and minor pipeline improvements

pull/160/head
David Dreschner 2025-01-19 17:54:46 +01:00
rodzic d930010f76
commit 7b7f43f75f
2 zmienionych plików z 21 dodań i 11 usunięć

Wyświetl plik

@ -5,30 +5,34 @@ on:
tags:
- '*'
permissions:
contents: read
jobs:
deploy:
if: github.repository == 'jazzband/icalevents'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Checkout repository with all history for all branches and tags"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
- name: "Set up latest Python 3 version"
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==2.0.1
- name: "Install poetry"
uses: abatilo/actions-poetry@v3
with:
poetry-version: 2.0.1
- name: Build package
- name: "Build package"
run: poetry build
- name: Upload packages to Jazzband
- name: "Upload packages to Jazzband"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:

Wyświetl plik

@ -20,23 +20,29 @@ jobs:
- "6.1"
steps:
- uses: actions/checkout@v4
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Set up Python 3.9"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: "3.9"
- name: "Install poetry"
uses: abatilo/actions-poetry@v3
with:
poetry-version: 2.0.1
- name: "Install dependencies"
- name: "Install icalendar ${{ matrix.icalendar-version }} and other dependencies"
run: |
poetry add icalendar~=${{ matrix.icalendar-version }}.0 --no-interaction
poetry install --no-interaction --no-root
- name: "Test with pytest"
run: |
poetry run coverage run test.py
poetry run coverage xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v5
with: