【发布时间】:2023-01-03 01:56:23
【问题描述】:
圣诞快乐,亲爱的聪明的参与者我有这份工作
test-dev:
stage: test
script:
- mkdir -p tests/js/screens/diffs
- docker run --rm -d --name=browser_$CI_JOB_ID -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome
- npx mocha tests/js/screenshots-* --timeout 50000
- npx playwright test tests/js/pw_*
- php artisan test
- docker stop browser_$CI_JOB_ID
artifacts:
when: always
name: $CI_COMMIT_SHA
untracked: true
paths:
- tests/js/screens
- tests/js/report
cache:
when: always
paths:
- storage/framework
- vendor/ #composer packages
- node_modules
- public
key:
files:
- vendor/ #composer packages
- composer.lock
tags:
- test_new_runner
相同的工作,但正在进行重建
test-dev:
# allow_failure: true
stage: test
image: selenium/standalone-chrome
script:
- mkdir -p tests/js/screens/diffs
# - docker run --rm -d --name=browser_$CI_JOB_ID -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome
- npx mocha tests/js/screenshots-* --timeout 50000
- npx playwright test tests/js/pw_*
- php artisan test
# - docker stop browser_$CI_JOB_ID
artifacts:
when: always
name: $CI_COMMIT_SHA
untracked: true
paths:
- tests/js/screens
- tests/js/report
cache:
when: always
paths:
- storage/framework
- vendor/ #composer packages
- node_modules
- public
key:
files:
- vendor/ #composer packages
- composer.lock
tags:
- test_new_runner
我想删除 docker launch,因为它失败了,但我不知道如何将其与图像一起使用 但是如果我使用图像,我里面没有 npx 我不知道该怎么做,有人可以帮忙吗?
【问题讨论】:
标签: docker selenium gitlab-ci gitlab-ci-runner npx