diff --git a/.github/workflows/ci-python-uv.yml b/.github/workflows/ci-python-uv.yml new file mode 100644 index 0000000..18512a8 --- /dev/null +++ b/.github/workflows/ci-python-uv.yml @@ -0,0 +1,40 @@ +name: ci + +on: + workflow_call: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0 + - uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2 + - uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a #v5.1.0 + with: + enable-cache: true + - name: Set up Python + run: uv python install + - name: Setup the project + run: uv sync --all-extras --dev + - name: Lint markdown files + run: just lint-md + - name: Lint Python files + run: just lint-python + - name: Lint the docs + run: just docs + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0 + - uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a #v5.1.0 + with: + enable-cache: true + - name: Set up Python + run: uv python install + - name: Setup the project + run: uv sync --all-extras --dev + - name: Run the unit tests + run: just test diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index a196a69..156cb38 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -9,11 +9,11 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0 - - uses: ts-graphviz/setup-graphviz@d5b2b6b67007094b256f3fd2fa6cf0ac41ceef25 # v2.0.0 + - uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2 - uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9 - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: "3.12" + python-version: "3.13" cache: "poetry" - name: Setup the project run: poetry install @@ -32,7 +32,7 @@ jobs: - uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9 - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: "3.12" + python-version: "3.13" cache: "poetry" - name: Setup the project run: poetry install diff --git a/.github/workflows/release-python-uv.yml b/.github/workflows/release-python-uv.yml new file mode 100644 index 0000000..5d5fdf4 --- /dev/null +++ b/.github/workflows/release-python-uv.yml @@ -0,0 +1,60 @@ +name: release + +on: + workflow_call: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0 + - uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2 + - uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a #v5.1.0 + with: + enable-cache: true + - name: Set up Python + run: uv python install + - name: Setup the project + run: uv sync --all-extras --dev + - name: Lint markdown files + run: just lint-md + - name: Lint Python files + run: just lint-python + - name: Build the docs + run: just docs + - name: Upload documentation for release + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + with: + name: docs + path: docs/build/html/ + + docs: + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: docs + path: docs/build/html + - name: Deploy + uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/build/html/ + + release: + runs-on: ubuntu-latest + needs: + - docs + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Get Changelog Entry + id: changelog_reader + uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3 + - name: Publish the release + uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0 + with: + body: ${{ steps.changelog_reader.outputs.changes }}