-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: codespell, stale, test workflows
- Loading branch information
1 parent
c016069
commit 12760b0
Showing
3 changed files
with
81 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Codespell configuration is within .codespellrc | ||
--- | ||
name: Codespell | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
codespell: | ||
name: Check for spelling errors | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Codespell | ||
uses: codespell-project/actions-codespell@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
name: Mark stale issues and pull requests | ||
|
||
name: "Close stale issues" | ||
on: | ||
schedule: | ||
- cron: "0 13 * * 1" | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
stale: | ||
name: Stale | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v3 | ||
- uses: actions/stale@v9 | ||
with: | ||
days-before-stale: 30 | ||
days-before-close: 1 | ||
stale-issue-label: "stale :zzz:" | ||
stale-issue-message: "This issue is stale. Remove stale label or it will be closed tomorrow." | ||
stale-pr-label: "stale :zzz:" | ||
stale-pr-message: "This PR is stale. Remove stale label or it will be closed tomorrow." | ||
exempt-issue-labels: "in progress :construction:" | ||
exempt-pr-labels: "in progress :construction:" | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-message: "Issue is stale and will be closed in 14 days unless there is new activity" | ||
stale-pr-message: "PR is stale and will be closed in 14 days unless there is new activity" | ||
stale-issue-label: "stale" | ||
exempt-issue-labels: "stale-exempt,kind/feature-request" | ||
stale-pr-label: "stale" | ||
exempt-pr-labels: "stale-exempt" | ||
remove-stale-when-updated: "True" | ||
operations-per-run: 500 | ||
days-before-stale: 180 | ||
days-before-close: 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [develop, main] | ||
pull_request: | ||
branches: [develop, main] | ||
types: | ||
- opened | ||
- synchronize | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install PDM | ||
run: python -m pip install pdm | ||
- name: Install dependencies with PDM | ||
run: pdm install | ||
- name: Run tests with coverage report | ||
run: pdm run pytest --cov=./ --cov-report=html -m "not manual" | ||
- name: Store coverage files | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-html | ||
path: htmlcov | ||
|
||
# https://github.com/marketplace/actions/alls-green#why | ||
alls-green: # This job does nothing and is only used for the branch protection | ||
if: always() | ||
needs: | ||
- test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} |