Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c8c795f
fix(test): upgrade mongodb-memory-server to 11 and pin MongoDB 8.0.17
seanspeaks Oct 24, 2026
7078198
test(core): stop starting an in-memory MongoDB for every core test run
seanspeaks Oct 24, 2026
fdfe766
test(core): move real-database suites to *.db.test.js and `npm run te…
seanspeaks Oct 24, 2026
2a2adff
fix(core): actually load API-module credential encryption fields
seanspeaks Oct 24, 2026
bccef86
test(core): expect the API-key credential fields in the core schema
seanspeaks Oct 24, 2026
134ff2a
test(core): make the DocumentDB encryption test use the real envelope…
seanspeaks Oct 24, 2026
c27dd70
test(core): fix broken mocks in the DocumentDB mapping encryption test
seanspeaks Oct 24, 2026
67a8f4b
test(core): use 32-byte keys and a 4-part envelope in the Cryptor test
seanspeaks Oct 24, 2026
24b0557
test(core): assert Boom status codes, not default messages, in auth t…
seanspeaks Oct 24, 2026
162ee92
test(core): update find-integration-context tests to the { externalId…
seanspeaks Oct 24, 2026
cd616a5
fix(core): give each SQS batch its own Entries array in batchSend
seanspeaks Oct 24, 2026
faea3e2
test(core): expect documentdb in the dbType validation message
seanspeaks Oct 24, 2026
dd92793
test(core): make the health-check ping timing tests deterministic
seanspeaks Oct 24, 2026
a018ef5
test(core): port the webhook flow test to the AWS SDK v3 SQS client
seanspeaks Oct 24, 2026
8567def
test(core): keep Node runtime warnings out of the require-graph probe
seanspeaks Oct 24, 2026
5850051
test(test): smoke-test TestMongo under `npm run test:db`
seanspeaks Oct 24, 2026
6b940d0
ci: run Frigg CI on pushes to next
seanspeaks Oct 24, 2026
6428df7
ci: test on Node 22.x and 24.x
seanspeaks Oct 24, 2026
82ce5ea
ci: shallow checkout, setup-node npm cache, cancel superseded runs
seanspeaks Oct 24, 2026
bf001d1
ci: replace lint auto-fix + auto-commit with a read-only lint check
seanspeaks Oct 24, 2026
a4a26dd
ci: run the *.db.test.js suites in their own job with Mongo and Postgres
seanspeaks Oct 24, 2026
ecad26a
ci: retire test-cli.yml, keep its CLI smoke check in Frigg CI
seanspeaks Oct 24, 2026
db74351
test(core): run the repository parity suites in the DB job
seanspeaks Oct 24, 2026
22c1a77
fix(devtools): attach every user-supplied Lambda security group
seanspeaks Oct 24, 2026
54d8ae8
chore(devtools): neutral wording in a VpcBuilder comment
seanspeaks Oct 24, 2026
82ddf5c
fix(devtools): really ignore legacy VPC options under managementMode=…
seanspeaks Oct 24, 2026
6ce515d
test(devtools): add a jest config that only collects *.test.js / *.sp…
seanspeaks Oct 24, 2026
65014bc
test(devtools): update composer tests to the domain-builder composer,…
seanspeaks Oct 24, 2026
3476f15
test(devtools): replace postgres/integration tests written for the de…
seanspeaks Oct 24, 2026
6a544b3
test(devtools): align health tests with current monitors, drift shape…
seanspeaks Oct 24, 2026
b4d7140
test(devtools): update discovery and VpcBuilder tests to current beha…
seanspeaks Oct 24, 2026
704ca4c
test(devtools): fix the frigg-cli suites and drop the obsolete index …
seanspeaks Oct 24, 2026
52f1374
test(devtools): skip two suites whose subject doesn't exist, with tra…
seanspeaks Oct 24, 2026
9045bbc
fix(test): keep the optional encoding entries in the lockfile
seanspeaks Oct 24, 2026
91495fa
ci: no password for the throwaway Postgres; npx runs only installed bins
seanspeaks Oct 24, 2026
325d9af
fix(core): make encryption-registry failures visible and fail closed …
seanspeaks Oct 24, 2026
3993629
fix(core): keep legacy plaintext and string types intact on the Prism…
seanspeaks Oct 24, 2026
be66998
ci: only cancel superseded runs on pull requests
seanspeaks Oct 24, 2026
3c342b4
test(devtools): stop blessing the route-association rename; skip it p…
seanspeaks Oct 24, 2026
3126961
fix(test): depend on mongodb-memory-server-core so nothing downloads …
seanspeaks Oct 24, 2026
40c6a2a
ci: make the CLI smoke test catch a dropped or renamed command
seanspeaks Oct 24, 2026
bf11c4c
ci: fail the Mongo step if the replica set never gets a primary
seanspeaks Oct 24, 2026
ced54b0
ci: read-only GITHUB_TOKEN for the whole Frigg CI workflow
seanspeaks Oct 24, 2026
7cfcf12
docs: describe *.db.test.js / test:db and opt-in TestMongo in TESTING.md
seanspeaks Oct 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 148 additions & 26 deletions .github/workflows/frigg-ci.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,42 @@

on:
push:
branches: [main]
branches: [main, next]
paths-ignore:
- docs/**
pull_request:
branches: ["**"]

# A newer push to the same PR supersedes its running check. Pushes to
# main/next are never cancelled: release.yml publishes every push to next,
# so each published commit must keep its own CI result.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

# Read-only token for every job: CI no longer pushes commits.
permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [22.x]
# The Node lines 2.0.1 supports.
node-version: [22.x, 24.x]

steps:
- name: Check Out Code ⤵️
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }} 🛠
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Use correct NPM version 🛠
run: npm run use:npm

- name: Cache node modules 📦
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
cache: npm

- name: Install Dependencies 🛠
run: npm ci
Expand All @@ -59,11 +54,138 @@
run: npm run test:all
timeout-minutes: 10

# NOTE: Linter steps should run last. If the linter auto-fixes files and pushes the fixes, the result is that any errors that may occur in previous steps may be hidden in the pull request because tests will not be run on the auto-fix commits.
# CLI smoke test (from the retired test-cli.yml). `frigg --help` loads
# every command module (index.js requires them eagerly), and each
# expected command must be listed: `frigg <unknown> --help` exits 0, so
# per-command --help calls couldn't catch a dropped or renamed command.
- name: CLI smoke test 🧰
run: |
help="$(npx --no-install frigg --help)"
echo "$help"
for cmd in init install start build deploy generate-iam ui db:setup doctor repair ssm auth; do
if ! grep -qE "^ ${cmd}( |\$)" <<<"$help"; then
echo "::error::frigg --help no longer lists the '${cmd}' command"
exit 1
fi
done

db:
# Opt-in database integration suites (`*.db.test.js`, `npm run test:db`).
# They are excluded from test:all so unit runs never need a database.
# The Postgres service also serves the tenant-isolation suite
# (FRIGG_TEST_POSTGRES_URL) once it lands on next.
runs-on: ubuntu-latest
permissions:
contents: read
services:
postgres:
image: postgres:16
env:
# Throwaway database reachable only from this job: trust auth, so the
# workflow carries no password for secret scanners to flag.
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: frigg
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
FRIGG_TEST_MONGODB_URL: mongodb://localhost:27017/frigg?replicaSet=rs0
FRIGG_TEST_POSTGRES_URL: postgresql://postgres@localhost:5432/frigg?schema=public
# Repository parity suites: every adapter (MongoDB, DocumentDB-on-Mongo,
# PostgreSQL) against the same cases.
INTEGRATION_ENTITIES_PARITY_MONGO_URL: mongodb://localhost:27017/frigg?replicaSet=rs0
INTEGRATION_ENTITIES_PARITY_POSTGRES_URL: postgresql://postgres@localhost:5432/frigg?schema=public
QUERY_MAPPINGS_PARITY_MONGO_URL: mongodb://localhost:27017/frigg?replicaSet=rs0
QUERY_MAPPINGS_PARITY_POSTGRES_URL: postgresql://postgres@localhost:5432/frigg?schema=public
MONGOMS_DOWNLOAD_DIR: ${{ github.workspace }}/.cache/mongodb-binaries
steps:
- name: Check Out Code ⤵️
uses: actions/checkout@v4

# Prisma needs a replica set for MongoDB writes, and service containers
# can't take the --replSet argument, so start it directly.
- name: Start MongoDB replica set 🍃
run: |
docker run -d --name mongo -p 27017:27017 mongo:8.0 --replSet rs0 --bind_ip_all

Check failure on line 113 in .github/workflows/frigg-ci.js.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make sure this MongoDB password gets changed and removed from the code.

See more on https://sonarcloud.io/project/issues?id=friggframework_frigg&issues=AaFr-eXW9STyF5DdoLZV&open=AaFr-eXW9STyF5DdoLZV&pullRequest=710
for i in $(seq 1 30); do
docker exec mongo mongosh --quiet --eval 'db.runCommand({ ping: 1 }).ok' && break
sleep 1
done
docker exec mongo mongosh --quiet --eval 'rs.initiate({ _id: "rs0", members: [{ _id: 0, host: "localhost:27017" }] })'
primary=false
for i in $(seq 1 30); do
if [ "$(docker exec mongo mongosh --quiet --eval 'db.hello().isWritablePrimary')" = "true" ]; then
primary=true
break
fi
sleep 1
done
if [ "$primary" != true ]; then
echo "::error::MongoDB replica set did not elect a primary within 30s"
docker logs mongo | tail -50
exit 1
fi

- name: Use Node.js 22.x 🛠
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: npm

- name: Install Dependencies 🛠
run: npm ci

Check warning on line 140 in .github/workflows/frigg-ci.js.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Omitting "--ignore-scripts" allows lifecycle scripts to run during package installation.

See more on https://sonarcloud.io/project/issues?id=friggframework_frigg&issues=AaFr-eXW9STyF5DdoLZL&open=AaFr-eXW9STyF5DdoLZL&pullRequest=710

- name: Cache mongodb-memory-server binaries 📦
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.cache/mongodb-binaries
key: mongodb-binaries-${{ runner.os }}-${{ hashFiles('packages/test/mongodb.js') }}

- name: Prepare databases 🗄
working-directory: packages/core
run: |
npm run prisma:generate
DATABASE_URL="$FRIGG_TEST_POSTGRES_URL" npx --no-install prisma migrate deploy --schema prisma-postgresql/schema.prisma
DATABASE_URL="$FRIGG_TEST_MONGODB_URL" npx --no-install prisma db push --skip-generate --schema prisma-mongodb/schema.prisma

- name: DB tests 🧪
run: npm run test:db --workspaces --if-present
timeout-minutes: 10

- name: Linter 🔍
run: npm run lint:fix --workspaces
lint:
# Read-only lint check: reports prettier/eslint problems, never rewrites
# files or pushes commits. Non-blocking for now because the tree has a
# large existing backlog (e.g. core: ~390 files need prettier, 96 eslint
# errors); make the step blocking once that backlog is cleared.
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check Out Code ⤵️
uses: actions/checkout@v4

- uses: stefanzweifel/git-auto-commit-action@v4
- name: Use Node.js 22.x 🛠
uses: actions/setup-node@v4
with:
commit_message: ✨ Apply lint auto-fixes
node-version: 22.x
cache: npm

- name: Install Dependencies 🛠
run: npm ci

Check warning on line 178 in .github/workflows/frigg-ci.js.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Omitting "--ignore-scripts" allows lifecycle scripts to run during package installation.

See more on https://sonarcloud.io/project/issues?id=friggframework_frigg&issues=AaFr-eXW9STyF5DdoLZQ&open=AaFr-eXW9STyF5DdoLZQ&pullRequest=710

- name: Lint (check only) 🔍
continue-on-error: true
run: |
status=0
for ws in packages/*/; do
# Packages that define lint:fix are the ones with a lint setup.
node -e "process.exit(require('./${ws}package.json').scripts?.['lint:fix'] ? 0 : 1)" || continue
echo "::group::${ws}"
(cd "$ws" && npx --no-install prettier --check --loglevel warn . && npx --no-install eslint .) || status=1
echo "::endgroup::"
done
exit $status
Loading
Loading