The checks can run here, before a push - #761
Merged
Merged
Conversation
Owner: "better run all ci stuff inside commit. github bill came around 200 usd", and on scope: "deploy stuff is okay. other check only i said." `npm run check` runs the CHECK half of ci.yml against the tree in front of you: the attribution guard, ESLint, Prettier, the API docs comparison, the three packaging checks and the desktop suite. About twenty-five seconds. The deploys, the releases and the installer packaging stay where they are - they need secrets, signing keys and three operating systems. The slow ones are opt-in with --all: the API unit suite, the REST suite against a real database, and the scan of every blob ever committed. A check nobody waits for is a check nobody runs. PRE-PUSH, NOT PRE-COMMIT. A commit is how you save your place - twenty an hour, half of them on a branch nobody will see. A minute of checks in front of each is how a hook ends up permanently disabled with -n, and then it protects nothing. A push is when the work leaves. A missing prerequisite SKIPS rather than fails. Three desktop tests need the pages CI builds first, which a working copy does not have; failing on that every time would make this hook the first thing anybody bypasses. This does not replace the checks on the pull request, and is not meant to. They run on a clean machine with a clean checkout, which is the only thing that catches a file never committed or a stale build left in a folder.
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner: "better run all ci stuff inside commit. github bill came around 200 usd", and on scope: "deploy stuff is okay. other check only i said."
npm run checkruns the check half ofci.ymlagainst the tree in front of you. About 25 seconds.Deploys, releases and installer packaging stay where they are: they need secrets, signing keys and three operating systems.
Opt-in with
--all: the API unit suite, the REST suite against a real database, and the scan of every blob ever committed. Minutes each, and a check nobody waits for is a check nobody runs.Pre-push, not pre-commit
A commit is how you save your place - twenty an hour, half of them on a branch nobody will ever see. A minute of checks in front of each one is how a hook ends up permanently disabled with
-n, and then it protects nothing. A push is when the work leaves, which is the moment worth checking.git push --no-verifyis the deliberate escape hatch.The hook proved itself on its own first push: it ran, and this branch went out behind it.
A missing prerequisite skips, it does not fail
Three desktop tests need the pages CI builds first (
npm run build:assetsinfrontend/), which a working copy does not have. Failing on that every time would make this hook the first thing anybody bypasses, so it says what is missing and gets out of the way.What this does not do
Replace the checks on the pull request, and it is not meant to. Those run on a clean machine with a clean checkout - the only thing that catches a file never committed, a dependency installed globally, or a stale build left in a folder. This asks a weaker question of the tree you have, deliberately.
On the bill itself: this repository is public, and GitHub does not charge for standard runners on public repositories - so POS minutes are not what the $200 is. See the conversation for where to look. This is still worth having for the round trip it saves.