ci: add GitHub Actions checks and Docker image publishing#39
Open
Digvijay-x1 wants to merge 3 commits into
Open
ci: add GitHub Actions checks and Docker image publishing#39Digvijay-x1 wants to merge 3 commits into
Digvijay-x1 wants to merge 3 commits into
Conversation
Add CI coverage for package config validation, typechecking, tests, and builds, with a Postgres service for the DB-backed API tests. Add a separate Docker workflow that builds service images on PRs and publishes GHCR images from main, tags, and manual runs. Full repo lint is not enabled yet because the current tree has few existing biome diagnostics, so CI starts with the checks that are green and useful today: config validation, typecheck, tests, and build.
Contributor
|
Looks good from a first glance! Feel free to set as 'ready to review' whenever ready |
The @pierre/diffs package reads navigator.userAgent during module load, which breaks the Node.js test environment used by GitHub Actions. Add a minimal navigator shim before dynamically importing the incident PR diff model so the web test suite can run in CI.
81ab17b to
9552872
Compare
Contributor
Author
|
Now everything is green in my Actions ☘ |
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.
This PR adds GitHub Actions so PRs and branch pushes run the basic project checks automatically.
The CI workflow installs pnpm, validates package/Turbo config, runs typechecks, runs the test suite against Postgres, and builds the repo. I also added a Docker workflow that builds the API, proxy, worker, web, and collector images on PRs, and publishes them to GHCR from
main, tags, or manual runs.While wiring this up, I added missing package-level
testscripts soturbo run testhas a real workspace task to execute, quoted test globs so Node receives them correctly, and tightened Turbo’s test env passthrough to only the values CI needs.This file
apps/api/src/github.test.tswas missed by previous test runs.** I have not added linting completely because there were a few linting issues currently.
Summary by cubic
Add CI to validate config, typecheck, run tests against Postgres, and build on PRs and pushes. Add Docker image builds and GHCR publishing, and ensure all workspace and web tests run in Node-based CI.
New Features
biome, typecheck, test with Postgres service, and build usingpnpm/turbo.api,proxy,worker,web, andcollectorimages; tag viadocker/metadata-action; publish toghcr.io(non-PRs); cache per-service.Refactors
testscripts withfind | sort | xargs tsx --testacross apps/packages; add roottestto runturbo run test.turbo.json: pass onlyBETTER_AUTH_SECRETandDATABASE_URLto tests; include.next/**in build outputs and exclude.next/cache/**.apps/api/src/github.test.tsassertions for resolved reason fields; minor seed formatting.navigatorand dynamically import the web diff model in tests to run under Node in CI.Written for commit 9552872. Summary will update on new commits.