diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..eeacead --- /dev/null +++ b/.github/workflows/codespell.yml @@ -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 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 70adf59..0e6b597 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1ab3e6e --- /dev/null +++ b/.github/workflows/test.yml @@ -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) }}