Skip to content

Commit

Permalink
wip test
Browse files Browse the repository at this point in the history
- is there a sweet spot for runner availability
- how could this be more legible in output?
  - callable workflows?
  • Loading branch information
p2edwards committed Nov 23, 2024
1 parent 07bb48e commit 5175236
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ should-run-pytest:
should-run-darker:
- '{kpi,kobo,hub}/**/*.py' # .py
- 'pyproject.toml' # rules
- '.github/workflows/darker.yml' # ci
# WIP
# - '.github/workflows/darker.yml' # ci

new-files-at-root-level:
# New and unrecognized files can affect CI test results.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
changes:
name: Detect files changed

runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
pull-requests: read

Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/darker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@ name: Python linter (Darker)

on: [pull_request]
jobs:
changes:
name: check files changed
runs-on: ubuntu-22.04
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with: { filters: .github/filters.yml }
outputs:
darker: ${{ steps.filter.outputs.should-run-darker }}

darker:
needs: changes
if: ${{ needs.changes.outputs.pytest == 'true' }}

runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

changes:
name: check files changed
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
pull-requests: read
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
changes:
name: check files changed
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
pull-requests: read
steps:
Expand All @@ -22,13 +22,13 @@ jobs:
pytest: ${{ steps.filter.outputs.should-run-pytest }}
new-unknown-files: ${{ steps.filter.outputs.new-files-at-root-level }}
build:
runs-on: ubuntu-20.04
needs: changes
if: |
github.event_name == 'push'
|| needs.changes.outputs.pytest == 'true'
|| needs.changes.outputs.new-unknown-files == 'true'
needs: changes
runs-on: ubuntu-20.04
env:
DATABASE_URL: postgis://kobo:kobo@localhost:5432/kpi_test
DJANGO_LANGUAGE_CODES: "ar cs de-DE en es fr hi ku pl pt tr zh-hans"
Expand Down

0 comments on commit 5175236

Please sign in to comment.