chore: add checks for schema changes#1992
Conversation
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
This removes code duplication and makes the CI checks consistent with the development environment. Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
|
@mentonin are we dropping the removal of the schema.yml from versioning? |
|
how come the CI checks are empty? |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 |
There was a problem hiding this comment.
wont we need to setup node (and pnpm) to be able to run the frontend linters?
There was a problem hiding this comment.
Nice catch. Pre-commit is able to setup isolated environments, including for node, but we are not using that for the frontend checks
| path: ./dashboard/node_modules | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v4 |
There was a problem hiding this comment.
might be needed on pre-commit run?
There was a problem hiding this comment.
we are using the old task name here
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 |
There was a problem hiding this comment.
might be better to reuse setup-backend
uses: ./.github/actions/setup-backend
There was a problem hiding this comment.
We don't need poetry and dependencies, as pre-commit should use its own environment for running tests
| CI: true | ||
|
|
||
| jobs: | ||
| pre-commit-checks: |
There was a problem hiding this comment.
might be worth to include timeout just in case
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
7ee4186 to
edd0c86
Compare
tales-aparecida
left a comment
There was a problem hiding this comment.
we can improve it later if this new precommit hook is really slow
Summary
This PR adds a pre-commit hook to check that
backend/schema.ymlis up-to-date withpython manage.py spectacular.It also adds all pre-commit checks to the CI workflow, replacing duplicated linting/format specifications.
Related Issues