Skip to content

refactor!: rename methods #15

refactor!: rename methods

refactor!: rename methods #15

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
lint:
name: Run linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up PDM with Python ${{ matrix.python-version }}
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pdm sync -d -G test
- name: Test with pytest
run: |
pdm run -v test --junit-xml pytest.xml
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.python-version }}
path: pytest.xml
publish-test-results:
name: "Publish Tests Results"
runs-on: ubuntu-latest
needs: test
permissions:
checks: write
pull-requests: write
if: always()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: "artifacts/**/*.xml"
release:
name: Release new version
runs-on: ubuntu-latest
concurrency: release
needs: [lint, test]
if: github.repository == 'cachitas/stringx'
environment: PyPI
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Python Semantic Release
id: release
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: pdm-project/setup-pdm@v4
if: steps.release.outputs.released == 'true'
- name: Publish package distributions to PyPI
id: pypi-publish
if: steps.release.outputs.released == 'true'
run: pdm publish