Skip to content

Commit 4366aba

Browse files
committed
rename test Dockerfiles to Dockerfile.test
1 parent 0a2e2ea commit 4366aba

67 files changed

Lines changed: 166 additions & 47 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test-module-container.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ jobs:
131131

132132
- name: ensure module test Dockerfile exists
133133
run: |
134-
dockerfile_path="src/modules/${{ matrix.module }}/container/Dockerfile"
134+
dockerfile_path="src/modules/${{ matrix.module }}/container/Dockerfile.test"
135135
if [[ -f "$dockerfile_path" ]]; then
136-
echo "Using existing Dockerfile at $dockerfile_path"
136+
echo "Using existing test Dockerfile at $dockerfile_path"
137137
exit 0
138138
fi
139139
140-
echo "No Dockerfile found at $dockerfile_path, creating CI test Dockerfile"
140+
echo "No test Dockerfile found at $dockerfile_path, creating CI test Dockerfile"
141141
cat > "$dockerfile_path" <<EOF_DOCKER
142142
FROM node:22-alpine
143143
WORKDIR /home/node/module

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
## Module Testing Standard
44

55
- Use docker-based test execution for module containers.
6-
- For module container packages, set `scripts.test` to build and run tests in Docker using each module's `Dockerfile`.
6+
- For module container packages, set `scripts.test` to build and run tests in Docker using each module's `Dockerfile.test`.
77
- Prefer this pattern for module test commands:
88

99
```sh
10-
docker build -f ./Dockerfile -t bug-module-test ../../../.. && docker run --rm --name bug-module-test-run bug-module-test npx jest --runInBand --config ./jest.config.cjs
10+
docker build -f ./Dockerfile.test -t bug-module-test ../../../.. && docker run --rm --name bug-module-test-run bug-module-test npx jest --runInBand --config ./jest.config.cjs
1111
```
1212

1313
## Scope
File renamed without changes.

src/modules/appear-x/container/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"production": "node ./api/server",
66
"development": "nodemon --verbose ./api/server",
7-
"test": "docker build -f ./Dockerfile -t bug-module-test ../../../.. && docker run --rm --name bug-module-test-run bug-module-test sh -lc 'if find . -path ./node_modules -prune -o -type f -name \"*.test.js\" -print | grep -q . || find . -path ./node_modules -prune -o -type f -name \"*.spec.js\" -print | grep -q .; then if [ -f ./jest.config.cjs ]; then npx jest --runInBand --config ./jest.config.cjs; else npx jest --runInBand; fi; else echo \"No tests found, skipping.\"; fi'"
7+
"test": "docker build -f ./Dockerfile.test -t bug-module-test ../../../.. && docker run --rm --name bug-module-test-run bug-module-test sh -lc 'if find . -path ./node_modules -prune -o -type f -name \"*.test.js\" -print | grep -q . || find . -path ./node_modules -prune -o -type f -name \"*.spec.js\" -print | grep -q .; then if [ -f ./jest.config.cjs ]; then npx jest --runInBand --config ./jest.config.cjs; else npx jest --runInBand; fi; else echo \"No tests found, skipping.\"; fi'"
88
},
99
"nodemonConfig": {
1010
"ignore": [
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM node:22-alpine
2+
WORKDIR /home/node/module
3+
COPY src/server/core ./core
4+
COPY src/modules/arista-switch/container ./
5+
RUN npm install
6+
CMD ["npm", "run", "development"]

src/modules/arista-switch/container/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"production": "node ./api/server",
66
"development": "nodemon --verbose ./api/server",
7-
"test": "docker build -f ./Dockerfile -t bug-module-test ../../../.. && docker run --rm --name bug-module-test-run bug-module-test sh -lc 'if find . -path ./node_modules -prune -o -type f -name \"*.test.js\" -print | grep -q . || find . -path ./node_modules -prune -o -type f -name \"*.spec.js\" -print | grep -q .; then if [ -f ./jest.config.cjs ]; then npx jest --runInBand --config ./jest.config.cjs; else npx jest --runInBand; fi; else echo \"No tests found, skipping.\"; fi'"
7+
"test": "docker build -f ./Dockerfile.test -t bug-module-test ../../../.. && docker run --rm --name bug-module-test-run bug-module-test sh -lc 'if find . -path ./node_modules -prune -o -type f -name \"*.test.js\" -print | grep -q . || find . -path ./node_modules -prune -o -type f -name \"*.spec.js\" -print | grep -q .; then if [ -f ./jest.config.cjs ]; then npx jest --runInBand --config ./jest.config.cjs; else npx jest --runInBand; fi; else echo \"No tests found, skipping.\"; fi'"
88
},
99
"nodemonConfig": {
1010
"ignore": [
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM node:22-alpine
2+
WORKDIR /home/node/module
3+
COPY src/server/core ./core
4+
COPY src/modules/audio-player/container ./
5+
RUN npm install
6+
CMD ["npm", "run", "development"]

src/modules/audio-player/container/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"production": "node ./api/server",
66
"development": "nodemon ./api/server",
7-
"test": "docker build -f ./Dockerfile -t bug-module-test ../../../.. && docker run --rm --name bug-module-test-run bug-module-test sh -lc 'if find . -path ./node_modules -prune -o -type f -name \"*.test.js\" -print | grep -q . || find . -path ./node_modules -prune -o -type f -name \"*.spec.js\" -print | grep -q .; then if [ -f ./jest.config.cjs ]; then npx jest --runInBand --config ./jest.config.cjs; else npx jest --runInBand; fi; else echo \"No tests found, skipping.\"; fi'"
7+
"test": "docker build -f ./Dockerfile.test -t bug-module-test ../../../.. && docker run --rm --name bug-module-test-run bug-module-test sh -lc 'if find . -path ./node_modules -prune -o -type f -name \"*.test.js\" -print | grep -q . || find . -path ./node_modules -prune -o -type f -name \"*.spec.js\" -print | grep -q .; then if [ -f ./jest.config.cjs ]; then npx jest --runInBand --config ./jest.config.cjs; else npx jest --runInBand; fi; else echo \"No tests found, skipping.\"; fi'"
88
},
99
"nodemonConfig": {
1010
"ignore": [
File renamed without changes.

src/modules/bmd-multiview16/container/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"production": "node ./api/server",
66
"development": "nodemon ./api/server",
7-
"test": "docker build -f ./Dockerfile -t bug-module-test ../../../.. && docker run --rm --name bug-module-test-run bug-module-test sh -lc 'if find . -path ./node_modules -prune -o -type f -name \"*.test.js\" -print | grep -q . || find . -path ./node_modules -prune -o -type f -name \"*.spec.js\" -print | grep -q .; then if [ -f ./jest.config.cjs ]; then npx jest --runInBand --config ./jest.config.cjs; else npx jest --runInBand; fi; else echo \"No tests found, skipping.\"; fi'"
7+
"test": "docker build -f ./Dockerfile.test -t bug-module-test ../../../.. && docker run --rm --name bug-module-test-run bug-module-test sh -lc 'if find . -path ./node_modules -prune -o -type f -name \"*.test.js\" -print | grep -q . || find . -path ./node_modules -prune -o -type f -name \"*.spec.js\" -print | grep -q .; then if [ -f ./jest.config.cjs ]; then npx jest --runInBand --config ./jest.config.cjs; else npx jest --runInBand; fi; else echo \"No tests found, skipping.\"; fi'"
88
},
99
"nodemonConfig": {
1010
"ignore": [

0 commit comments

Comments
 (0)