Skip to content

Commit fcf86ee

Browse files
authored
Merge pull request #974 from macbre/docker-ci-fix
Fix failing Docker CI pipeline
2 parents 8589a1f + 91df592 commit fcf86ee

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.github/workflows/dockerimage.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,29 @@ jobs:
1010
build_docker_image:
1111
runs-on: ubuntu-latest
1212

13+
timeout-minutes: 15
14+
15+
env:
16+
DOCKER_TAG: ghcr.io/macbre/phantomas:latest
17+
1318
steps:
1419
- uses: actions/checkout@v1
1520

1621
# https://github.com/marketplace/actions/build-and-push-docker-images
17-
- name: Build the Docker image
22+
- name: Build the Docker image with ${{ env.DOCKER_TAG }} tag
1823
uses: docker/build-push-action@v2
1924
with:
2025
context: .
21-
tags: ${{ github.repository }}
26+
tags: ${{ env.DOCKER_TAG }}
2227
build-args: |
23-
COMMIT_SHA=$(git rev-parse --short HEAD)
28+
GITHUB_SHA=${{ github.sha }}
2429
cache-from: |
25-
macbre/phantomas:latest
30+
${{ env.DOCKER_TAG }}
2631
2732
- name: Inspect built image
2833
run: |
2934
docker images
30-
docker inspect --format='{{json .Config.Labels}}' ${{ github.repository }} | jq
35+
docker inspect --format='{{json .Config.Labels}}' ${{ env.DOCKER_TAG }} | jq
3136
3237
- name: Run tests inside the Docker container
3338
run: |
@@ -36,4 +41,4 @@ jobs:
3641
docker run \
3742
--network=host \
3843
--security-opt seccomp=$(pwd)/chrome-seccomp.json \
39-
${{ github.repository }} npm t
44+
${{ env.DOCKER_TAG }} npm t

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function phantomas(url, opts) {
3939

4040
debug("Options: %s", JSON.stringify(options));
4141

42-
events.setMaxListeners(100); // MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
42+
events.setMaxListeners(250); // MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
4343

4444
var results = new Results();
4545
results.setUrl(url);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"prettier": "2.3.2"
5252
},
5353
"scripts": {
54-
"test": "jest test/ --coverage --detectOpenHandles",
54+
"test": "node --trace-warnings node_modules/.bin/jest test/ --coverage --detectOpenHandles",
5555
"unit-test": "jest test/results.test.js test/modules/ --coverage --detectOpenHandles",
5656
"lint": "eslint --cache .",
5757
"metadata": "DEBUG=generate node lib/metadata/generate.js",

0 commit comments

Comments
 (0)