@gallopsystems/agent-skills 1.31.0 → 1.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -179,37 +179,32 @@ Configure branch protection rules in GitHub:
|
|
|
179
179
|
- `test`
|
|
180
180
|
- `typecheck`
|
|
181
181
|
|
|
182
|
-
##
|
|
182
|
+
## Running the CI tests locally
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
Run the same tests against a disposable **native** Postgres (Postgres.app's binaries), not Docker. Don't start Docker
|
|
185
|
+
(`docker run`, `docker compose`, `open -a Docker`, testcontainers, `act`) unless the user asks for it. Use your own
|
|
186
|
+
port, never 5432, 5433 or 3306, so a test run can never reach a real local database:
|
|
185
187
|
|
|
186
188
|
```bash
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
PG=/Applications/Postgres.app/Contents/Versions/latest/bin
|
|
190
|
+
$PG/initdb --locale=en_US.UTF-8 -U postgres -D /tmp/myapp-pg
|
|
191
|
+
$PG/pg_ctl -D /tmp/myapp-pg -l /tmp/myapp-pg.log -o "-p 54329 -c fsync=off -c synchronous_commit=off \
|
|
192
|
+
-c full_page_writes=off" start
|
|
193
|
+
$PG/createdb -h 127.0.0.1 -p 54329 -U postgres myapp-test
|
|
189
194
|
|
|
190
|
-
# Run
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Or use Docker directly:
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
# Start test database
|
|
198
|
-
docker run -d --name test-db \
|
|
199
|
-
-e POSTGRES_USER=postgres \
|
|
200
|
-
-e POSTGRES_PASSWORD=postgres \
|
|
201
|
-
-e POSTGRES_DB=myapp-test \
|
|
202
|
-
-p 5432:5432 \
|
|
203
|
-
postgres:15
|
|
204
|
-
|
|
205
|
-
# Run tests
|
|
206
|
-
TEST_POSTGRESQL_CONNECTION_STRING=postgresql://postgres:postgres@localhost:5432/myapp-test \
|
|
207
|
-
yarn test
|
|
195
|
+
# Run tests (127.0.0.1, not localhost)
|
|
196
|
+
TEST_POSTGRESQL_CONNECTION_STRING=postgresql://postgres@127.0.0.1:54329/myapp-test yarn test
|
|
208
197
|
|
|
209
198
|
# Cleanup
|
|
210
|
-
|
|
199
|
+
$PG/pg_ctl -D /tmp/myapp-pg stop && rm -rf /tmp/myapp-pg
|
|
211
200
|
```
|
|
212
201
|
|
|
202
|
+
Before running, check that the test URL is set and doesn't point at 5432. An unset test URL can fall back to the
|
|
203
|
+
developer's real database.
|
|
204
|
+
|
|
205
|
+
If the user wants the workflow itself replayed, [act](https://github.com/nektos/act) runs it, but act needs Docker,
|
|
206
|
+
so only with their go-ahead.
|
|
207
|
+
|
|
213
208
|
## Secrets and Environment Variables
|
|
214
209
|
|
|
215
210
|
For production-like test databases or external services:
|