Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cicrcle ci #3884

Merged
merged 9 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ orbs:

defaults: &defaults
machine:
image: ubuntu-2204:2022.10.1
image: ubuntu-2204:2023.07.2
docker_layer_caching: false
steps:
- checkout
- run: .circleci/build.sh
- browser-tools/install-chrome:
chrome-version: 116.0.5845.96
replace-existing: true
- browser-tools/install-chromedriver
- run:
command: docker-compose run --rm test-acceptance.puppeteer
working_directory: test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
push_to_registry:
name: Build and push Docker image to Docker Hub
runs-on: ubuntu-latest

steps:
- name: Check out the repo with latest code
uses: actions/checkout@v4
Expand Down
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Download Playwright and its dependencies
FROM mcr.microsoft.com/playwright:v1.35.1
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true

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


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

# Allow to pass argument to codecept run via env variable
ENV CODECEPT_ARGS=""
Expand Down
13 changes: 4 additions & 9 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@ services:
- ..:/codecept
- node_modules:/codecept/node_modules

test-runner:
build: ..
entrypoint: /codecept/node_modules/.bin/mocha
command: test/runner
working_dir: /codecept
volumes:
- ..:/codecept
- node_modules:/codecept/node_modules

test-acceptance.webdriverio:
build: ..
env_file: .env
Expand All @@ -86,6 +77,7 @@ services:
- CODECEPT_ARGS=-c codecept.Puppeteer.js --grep @Puppeteer
depends_on:
- php
- puppeteer-image
volumes:
- ./acceptance:/tests
- ./data:/data
Expand Down Expand Up @@ -153,5 +145,8 @@ services:
- ..:/codecept
- node_modules:/codecept/node_modules

puppeteer-image:
image: ghcr.io/puppeteer/puppeteer:21.1.1

volumes:
node_modules: