Skip to content

Commit 015505d

Browse files
authored
fix: cicrcle ci (#3884)
* fix: cicrcle ci * fix: cicrcle ci * fix: cicrcle ci * try out actions/checkout@v3 * update machine image * fix: yml file * fix: yml file * fix: yml file * fix: yml file
1 parent 206d1df commit 015505d

File tree

4 files changed

+16
-21
lines changed

4 files changed

+16
-21
lines changed

Diff for: .circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ orbs:
55

66
defaults: &defaults
77
machine:
8-
image: ubuntu-2204:2022.10.1
8+
image: ubuntu-2204:2023.07.2
99
docker_layer_caching: false
1010
steps:
1111
- checkout
1212
- run: .circleci/build.sh
1313
- browser-tools/install-chrome:
14+
chrome-version: 116.0.5845.96
1415
replace-existing: true
15-
- browser-tools/install-chromedriver
1616
- run:
1717
command: docker-compose run --rm test-acceptance.puppeteer
1818
working_directory: test

Diff for: .github/workflows/docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
push_to_registry:
1313
name: Build and push Docker image to Docker Hub
1414
runs-on: ubuntu-latest
15-
15+
1616
steps:
1717
- name: Check out the repo with latest code
1818
uses: actions/checkout@v4

Diff for: Dockerfile

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Download Playwright and its dependencies
22
FROM mcr.microsoft.com/playwright:v1.35.1
3+
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
34

45
# Installing the pre-required packages and libraries
56
RUN apt-get update && \
@@ -9,14 +10,12 @@ RUN apt-get update && \
910
# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others)
1011
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer
1112
# installs, work.
12-
RUN apt-get update \
13-
&& apt-get install -y wget gnupg \
14-
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
15-
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
16-
&& apt-get update \
17-
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
18-
--no-install-recommends \
19-
&& rm -rf /var/lib/apt/lists/*
13+
RUN apt-get update && apt-get install -y gnupg wget && \
14+
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
15+
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
16+
apt-get update && \
17+
apt-get install -y google-chrome-stable --no-install-recommends && \
18+
rm -rf /var/lib/apt/lists/*
2019

2120

2221
# Add pptr user.
@@ -36,7 +35,8 @@ RUN ln -s /codecept/bin/codecept.js /usr/local/bin/codeceptjs
3635
RUN mkdir /tests
3736
WORKDIR /tests
3837
# Install puppeteer so it's available in the container.
39-
RUN npm i puppeteer
38+
39+
RUN google-chrome --version
4040

4141
# Allow to pass argument to codecept run via env variable
4242
ENV CODECEPT_ARGS=""

Diff for: test/docker-compose.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,6 @@ services:
5656
- ..:/codecept
5757
- node_modules:/codecept/node_modules
5858

59-
test-runner:
60-
build: ..
61-
entrypoint: /codecept/node_modules/.bin/mocha
62-
command: test/runner
63-
working_dir: /codecept
64-
volumes:
65-
- ..:/codecept
66-
- node_modules:/codecept/node_modules
67-
6859
test-acceptance.webdriverio:
6960
build: ..
7061
env_file: .env
@@ -86,6 +77,7 @@ services:
8677
- CODECEPT_ARGS=-c codecept.Puppeteer.js --grep @Puppeteer
8778
depends_on:
8879
- php
80+
- puppeteer-image
8981
volumes:
9082
- ./acceptance:/tests
9183
- ./data:/data
@@ -153,5 +145,8 @@ services:
153145
- ..:/codecept
154146
- node_modules:/codecept/node_modules
155147

148+
puppeteer-image:
149+
image: ghcr.io/puppeteer/puppeteer:21.1.1
150+
156151
volumes:
157152
node_modules:

0 commit comments

Comments
 (0)