From db3e05e6da262f7cdf96e5379152119d126e4250 Mon Sep 17 00:00:00 2001 From: June Date: Sat, 8 Jun 2024 23:14:54 +0200 Subject: [PATCH 1/3] docs: introduce new "ci" tag for changes to the CI and its configuration --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 54b06ef..9d5f208 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,7 @@ The `tag` should be one of the following: - `test` - for adding or correcting tests - `style` - for changes to the linter or formatter configuration and its results - `docs` - for changes to documentation only +- `ci` - for changes to the CI and its configuration - `other` - for anything that isn't covered by the tags above If a change is a breaking change then that should be indicated by adding a `!` after the tag. From 22c23ba3d606123cd7d6c98fe8d26adde186f4f2 Mon Sep 17 00:00:00 2001 From: June Date: Sat, 8 Jun 2024 23:41:32 +0200 Subject: [PATCH 2/3] ci: add a style.yaml workflow with a ruff job running ruff check --- .forgejo/workflows/style.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .forgejo/workflows/style.yaml diff --git a/.forgejo/workflows/style.yaml b/.forgejo/workflows/style.yaml new file mode 100644 index 0000000..4a74254 --- /dev/null +++ b/.forgejo/workflows/style.yaml @@ -0,0 +1,14 @@ +# Links & Resources: +# - https://hatch.pypa.io/latest/install/#github-actions +# - https://docs.astral.sh/ruff/integrations/#github-actions +on: push + +jobs: + ruff: + runs-on: docker + steps: + - uses: actions/checkout@v4 + - name: Install Hatch + uses: https://github.com/pypa/hatch@install + - name: Run Ruff + run: hatch run lint:ruff check --output-format=github . From 4afbebcf4a9bc0f0844834706b00060ca2c04c87 Mon Sep 17 00:00:00 2001 From: June Date: Sat, 8 Jun 2024 23:43:51 +0200 Subject: [PATCH 3/3] ci: add a black job to the style.yaml workflow running black --check --- .forgejo/workflows/style.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.forgejo/workflows/style.yaml b/.forgejo/workflows/style.yaml index 4a74254..b98d044 100644 --- a/.forgejo/workflows/style.yaml +++ b/.forgejo/workflows/style.yaml @@ -1,6 +1,7 @@ # Links & Resources: # - https://hatch.pypa.io/latest/install/#github-actions # - https://docs.astral.sh/ruff/integrations/#github-actions +# - https://black.readthedocs.io/en/stable/integrations/github_actions.html on: push jobs: @@ -12,3 +13,11 @@ jobs: uses: https://github.com/pypa/hatch@install - name: Run Ruff run: hatch run lint:ruff check --output-format=github . + black: + runs-on: docker + steps: + - uses: actions/checkout@v4 + - name: Install Hatch + uses: https://github.com/pypa/hatch@install + - name: Run Black + run: hatch run lint:black --check --diff .