diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b241d7d..96df083 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 685d91e..2696e81 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: