Skip to content

Commit a7685b1

Browse files
committed
GithubActions_DockerfileChanges
1 parent d29bded commit a7685b1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/playwright.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,4 @@ jobs:
3939

4040
# Step to run tests
4141
- name: Run tests
42-
run: npm run test:serial
43-
44-
# Step to run Docker container with specific environment variable and name
45-
- name: Run Docker container
46-
run: docker run -e npm_config_ENV=qa --name playContainer playtest
42+
run: npm run test:serial

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@ COPY . .
1616
# Install Chrome browser for use with Playwright
1717
RUN npx playwright install chrome
1818

19+
# Instead of passing --ENV="qa" in the command line (CMD parameter),
20+
# we are setting the environment variable here itself
21+
ENV npm_config_ENV=qa
22+
1923
# Here, we run the test script defined in package.json (npm run test:serial)
2024
CMD ["npm", "run", "test:serial"]

0 commit comments

Comments
 (0)