Skip to content

Commit d7eb784

Browse files
authored
Merge pull request #232 from orionrobots/copilot/fix-231
Fix BDD test dockerfile to use correct Node version - consolidate into serve.Dockerfile
2 parents 4b3663b + 35ef027 commit d7eb784

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

docker-compose.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,11 @@ services:
122122
test:
123123
build:
124124
context: .
125-
dockerfile: tests.Dockerfile
125+
dockerfile: serve.Dockerfile
126+
target: tests
126127
volumes:
127-
- ./tests:/app/tests
128-
- ./package.json:/app/package.json
129-
- ./package-lock.json:/app/package-lock.json
128+
- ./tests:/app/src/tests
129+
- ./package.json:/app/src/package.json
130+
- ./package-lock.json:/app/src/package-lock.json
130131
profiles:
131132
- manual

serve.Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WORKDIR /app/src
55

66
# Install dependencies
77
COPY package.json package-lock.json ./
8-
RUN npm install
8+
RUN npm ci
99

1010
# Copy rest of the app source
1111
COPY . /app/src
@@ -27,4 +27,9 @@ RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
2727
# COPY _site /var/www/html/
2828
COPY .github/scripts/staging/default.conf /usr/local/apache2/conf/httpd.conf
2929

30+
FROM base AS tests
31+
32+
# Set default command to run BDD tests
33+
CMD ["npm", "run", "test:bdd"]
34+
3035
FROM base

tests.Dockerfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)