diff --git a/.github/workflows/_checks.yml b/.github/workflows/_checks.yml new file mode 100644 index 0000000..88908af --- /dev/null +++ b/.github/workflows/_checks.yml @@ -0,0 +1,38 @@ +name: checks +on: + workflow_call: {} + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: extractions/setup-just@v4 + - uses: astral-sh/setup-uv@v8.2.0 + with: + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" + - run: uv python install 3.10 + - run: just install lint-ci + + pytest: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - "3.10" + - "3.11" + - "3.12" + - "3.13" + - "3.14" + steps: + - uses: actions/checkout@v6 + - uses: extractions/setup-just@v4 + - uses: astral-sh/setup-uv@v8.2.0 + with: + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" + - run: uv python install ${{ matrix.python-version }} + - run: just install + - run: just test . --cov=. --cov-report xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f58873..85af5ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ name: main - on: push: branches: @@ -11,43 +10,5 @@ concurrency: cancel-in-progress: true jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: extractions/setup-just@v2 - - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - cache-dependency-glob: "**/pyproject.toml" - - run: uv python install 3.10 - - run: just install lint-ci - - pytest: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: - - "3.10" - - "3.11" - - "3.12" - - "3.13" - - "3.14" - steps: - - uses: actions/checkout@v4 - - uses: extractions/setup-just@v2 - - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - cache-dependency-glob: "**/pyproject.toml" - - run: uv python install ${{ matrix.python-version }} - - run: just install - - run: just test . --cov=. --cov-report xml - - uses: codecov/codecov-action@v4.0.1 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - files: ./coverage.xml - flags: unittests - name: codecov-${{ matrix.python-version }} + checks: + uses: ./.github/workflows/_checks.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b637272..916fc36 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,9 +9,9 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: extractions/setup-just@v2 - - uses: astral-sh/setup-uv@v3 + - uses: actions/checkout@v6 + - uses: extractions/setup-just@v4 + - uses: astral-sh/setup-uv@v8.2.0 - run: just publish env: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} diff --git a/README.md b/README.md index e8b17c6..994721d 100644 --- a/README.md +++ b/README.md @@ -131,4 +131,4 @@ Browse the full list of templates and libraries in [`modern-python`](https://github.com/modern-python) — see the org profile for the categorized index. -## 📚 [Documentation](https://modern-di.readthedocs.io) +## 📚 [Documentation](https://modern-di.modern-python.org) diff --git a/pyproject.toml b/pyproject.toml index ed0415c..ea89045 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ version = "0" [project.urls] repository = "https://github.com/modern-python/modern-di-pytest" -docs = "https://modern-di.readthedocs.io" +docs = "https://modern-di.modern-python.org" [dependency-groups] dev = [