Skip to content

Commit 0ba23a8

Browse files
committed
feat: removing build dependencies and using testcontainers for container spin up
Signed-off-by: Simon Schrottner <[email protected]>
1 parent 8b7f14b commit 0ba23a8

27 files changed

+2175
-1222
lines changed

.github/workflows/ci.yml

-25
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ jobs:
2525
with:
2626
node-version: ${{ matrix.node-version }}
2727

28-
- uses: bufbuild/[email protected]
29-
with:
30-
github_token: ${{ github.token }}
3128
- run: npm ci
3229
- uses: nrwl/nx-set-shas@v3
3330
# This line is needed for nx affected to work when CI is running on a PR
@@ -42,24 +39,6 @@ jobs:
4239
e2e:
4340
runs-on: ubuntu-latest
4441

45-
services:
46-
flagd:
47-
image: ghcr.io/open-feature/flagd-testbed:v0.5.6
48-
ports:
49-
- 8013:8013
50-
flagd-unstable:
51-
image: ghcr.io/open-feature/flagd-testbed-unstable:v0.5.6
52-
ports:
53-
- 8014:8013
54-
sync:
55-
image: ghcr.io/open-feature/sync-testbed:v0.5.6
56-
ports:
57-
- 9090:9090
58-
sync-unstable:
59-
image: ghcr.io/open-feature/sync-testbed-unstable:v0.5.6
60-
ports:
61-
- 9091:9090
62-
6342
steps:
6443
- uses: actions/checkout@v4
6544
with:
@@ -74,9 +53,5 @@ jobs:
7453
- name: Install
7554
run: npm ci
7655

77-
- uses: bufbuild/[email protected]
78-
with:
79-
github_token: ${{ github.token }}
80-
8156
- name: e2e
8257
run: npm run e2e

libs/providers/flagd-web/jest.config.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
export default {
33
displayName: 'providers-flagd-web',
44
preset: '../../../jest.preset.js',
5-
globals: {
6-
'ts-jest': {
7-
tsconfig: '<rootDir>/tsconfig.spec.json',
8-
},
9-
},
105
transform: {
11-
'^.+\\.[tj]s$': 'ts-jest',
6+
'^.+\\.[tj]s$': ['ts-jest', {
7+
tsconfig: '<rootDir>/tsconfig.spec.json'
8+
}]
129
},
1310
testEnvironment: 'jsdom',
1411
moduleFileExtensions: ['ts', 'js', 'html'],

libs/providers/flagd-web/package-lock.json

+34-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/providers/flagd-web/project.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
"options": {
2222
"commands": [
2323
"git submodule update --init schemas",
24-
"rm -f -r ./src/proto",
25-
"cd schemas && buf generate buf.build/open-feature/flagd --template protobuf/buf.gen.ts-connect.yaml",
26-
"mv -v ./proto ./src"
24+
"npx buf generate buf.build/open-feature/flagd --template schemas/protobuf/buf.gen.ts-connect.yaml --output ./src/lib"
2725
],
2826
"cwd": "libs/providers/flagd-web",
2927
"parallel": false
@@ -76,7 +74,7 @@
7674
"executor": "nx:run-commands",
7775
"options": {
7876
"commands": [
79-
"npx jest"
77+
"npx jest --detectOpenHandles --runInBand"
8078
],
8179
"cwd": "libs/providers/flagd-web/src/e2e",
8280
"parallel": false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const FLAGD_NAME = 'flagd-web';
2+
3+
export const IMAGE_VERSION = 'v0.5.6';
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
export default {
22
displayName: 'providers-flagd-web-e2e',
33
transform: {
4-
'^.+\\.[tj]s$': ['ts-jest', { tsConfig: './tsconfig.lib.json' }],
4+
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: './tsconfig.lib.json' }],
55
},
66
moduleNameMapper: {
77
'^(.*)\\.js$': ['$1.js', '$1.ts', '$1'],
88
},
99
testEnvironment: 'node',
1010
preset: 'ts-jest',
1111
clearMocks: true,
12-
setupFiles: ['./setup.ts'],
12+
setupFiles: [],
1313
verbose: true,
1414
silent: false,
1515
};

libs/providers/flagd-web/src/e2e/setup.ts

-21
This file was deleted.

0 commit comments

Comments
 (0)