Skip to content
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
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

on:
pull_request:
branches:
- main
- master
push:
branches:
- main
- master
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docker-build:
name: docker-build (ubuntu-latest)
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Check out repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
with:
fetch-depth: 1
persist-credentials: false

- name: Set up Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd
with:
cache-binary: false

- name: Show Docker version
run: docker version

- name: Build thermoptic image
run: docker buildx build --platform linux/amd64 --file Dockerfile --tag thermoptic-ci:root --load .

- name: Build chrome image
run: docker buildx build --platform linux/amd64 --file chrome/Dockerfile --tag thermoptic-ci:chrome --load ./chrome

- name: Build proxyrouter image
run: docker buildx build --platform linux/amd64 --file proxyrouter/Dockerfile --tag thermoptic-ci:proxyrouter --load ./proxyrouter

compose-e2e:
name: compose-e2e
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Check out repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
with:
fetch-depth: 1
persist-credentials: false

- name: Prepare ignored runtime directories
shell: bash
run: mkdir -p ssl

- name: Run compose smoke and Cloudflare hook validation
shell: bash
run: npm run ci:compose-smoke
11 changes: 11 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
chrome:
environment:
ENABLE_GUI_CONTROL: "false"
CHROME_ENABLE_GPU: "false"
thermoptic:
environment:
AFTER_REQUEST_HOOK_FILE_PATH: /work/hooks/afterrequest.js
CDP_STARTUP_TIMEOUT_MS: 180000
DEBUG: "true"
TRACE: "false"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "main.js",
"type": "module",
"scripts": {
"ci:compose-smoke": "node scripts/compose-cloudflare-ci.test.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "mandatory",
Expand Down
Loading