Verify the problem is that the service hasn't started before tests execute
Test / test (push) Successful in 1m31s
Details
Test / test (push) Successful in 1m31s
Details
This commit is contained in:
parent
06e82c4f3f
commit
2031e8a3e7
|
|
@ -10,6 +10,8 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install docker
|
- name: Install docker
|
||||||
uses: papodaca/install-docker-action@main
|
uses: papodaca/install-docker-action@main
|
||||||
|
- name: Setup PG Data Dir
|
||||||
|
run: mkdir -p ./data-test
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
env: NODE_OPTIONS=--max-old-space-size=8192
|
env: NODE_OPTIONS=--max-old-space-size=8192
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ const pushSubscription2 = {
|
||||||
}
|
}
|
||||||
|
|
||||||
jest.mock("./settings", () => ({
|
jest.mock("./settings", () => ({
|
||||||
port: 5432,
|
port: 5434,
|
||||||
user: "postgres",
|
user: "postgres",
|
||||||
password: process.env.POSTGRES_PASSWORD,
|
password: process.env.POSTGRES_PASSWORD,
|
||||||
database: "test",
|
database: "test",
|
||||||
|
|
@ -53,9 +53,7 @@ describe("subscriptions", () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
try {
|
try {
|
||||||
exec("docker compose -f docker-compose-test.yaml logs", (_, out) =>
|
exec("docker ps", (_, out) => console.log(out))
|
||||||
console.log(out)
|
|
||||||
)
|
|
||||||
await migrateToLatest()
|
await migrateToLatest()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Something has exploded in migration")
|
console.log("Something has exploded in migration")
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
"start": "remix-serve ./build/server/index.js",
|
"start": "remix-serve ./build/server/index.js",
|
||||||
"typecheck": "tsc",
|
"typecheck": "tsc",
|
||||||
"watch": "export $(cat .env.test | xargs) && docker compose -f docker-compose-test.yaml up database -d --remove-orphans && jest --watch --config=jest.config.ts",
|
"watch": "export $(cat .env.test | xargs) && docker compose -f docker-compose-test.yaml up database -d --remove-orphans && jest --watch --config=jest.config.ts",
|
||||||
"test": "export $(cat .env.test | xargs) && docker compose -f docker-compose-test.yaml up database -d --remove-orphans && jest --config=jest.config.ts"
|
"test": "export $(cat .env.test | xargs) && docker compose -f docker-compose-test.yaml up database -d --remove-orphans && sleep 5 && jest --config=jest.config.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@remix-pwa/sw": "^3.0.9",
|
"@remix-pwa/sw": "^3.0.9",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue