Skip to content

Commit 92a6c76

Browse files
committed
i reaaallly hope this works
1 parent 1abd37a commit 92a6c76

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
- name: Typescript TSC
3737
run: cd frontend && npm install && npm run types
3838
- name: Building docker containers using docker-compose
39-
run: GO_MOD=go.mod docker compose --env-file=./config/ci.env.dev up --wait --build backend db staging_db
39+
run: GO_MOD=go.mod docker compose --env-file=./config/ci.env.dev up --wait --build backend db staging_db frontend
4040
- name: Wait for Go BE to configure
4141
uses: juliangruber/sleep-action@v1
4242
with:
4343
time: 5s
4444
- name: React tests
45-
run: cd frontend && npm test
45+
run: docker exec frontend npm test

config/ci.env.dev

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ PG_USER=postgres
44
PG_PASSWORD=postgres
55
PG_DB=test_db
66
PG_PORT=5432
7-
PG_HOST=db:5432
7+
PG_HOST=db:5432
8+
E2E_MODE=github

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ services:
2121
stdin_open: true
2222
ports:
2323
- 3000:3000
24+
environment:
25+
- E2E_MODE=${E2E_MODE}
2426
backend:
2527
container_name: go_backend
2628
build:

frontend/src/packages/api/tests/filesystemConsistency.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import { APIError, IsEmptyApiResponse } from "../types/general";
66
// filesystemConsistencyTests ensure that the contract maintained between the frontend and backend regarding endpoint input/response types are consistent
77
// note: requires the BE container to be up and running
88
beforeAll(() => {
9-
configureApiUrl("http://localhost:8080")
9+
if (process.env.E2E_MODE === "github") {
10+
configureApiUrl("http://backend:8080");
11+
} else {
12+
configureApiUrl("http://localhost:8080")
13+
}
1014
});
1115

1216
afterAll(() => {
@@ -35,7 +39,6 @@ describe("the filesystem api should", () => {
3539
// fetch the information
3640
const newEntityId = (newDocument as CreateFilesystemEntryResponse).NewID;
3741
const documentInformation = await FilesystemAPI.GetEntityInfo(newEntityId);
38-
console.log(newEntityId, documentInformation);
3942
expect(IsFilesystemEntry(documentInformation), 'Expected document information to be assignable to the FilesystemEntry type').toBe(true);
4043

4144
// rename it

0 commit comments

Comments
 (0)