Skip to content

Commit 3e3f824

Browse files
authored
Merge pull request #4490 from viezel/master
Add GitLab CI to Laravel Dusk
2 parents 8a891e1 + 9217554 commit 3e3f824

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

dusk.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
- [Codeship](#running-tests-on-codeship)
3737
- [Heroku CI](#running-tests-on-heroku-ci)
3838
- [Travis CI](#running-tests-on-travis-ci)
39+
- [GitLab CI](#running-tests-on-gitlab-ci)
3940

4041
<a name="introduction"></a>
4142
## Introduction
@@ -1317,3 +1318,26 @@ To run your Dusk tests on Travis CI, we will need to use the "sudo-enabled" Ubun
13171318

13181319
script:
13191320
- php artisan dusk
1321+
1322+
<a name="running-tests-on-gitlab-ci"></a>
1323+
### GitLab CI
1324+
1325+
To run Dusk tests on [GitLab CI](https://about.gitlab.com/features/gitlab-ci-cd/), add the following to your `.gitlab-ci.yml` file:
1326+
1327+
stages:
1328+
- test
1329+
1330+
browser_test:
1331+
image: laratools/ci:7.2
1332+
stage: test
1333+
before_script:
1334+
- composer install --prefer-dist --no-interaction --no-suggest
1335+
- cp .env.testing .env
1336+
- nohup php artisan serve &
1337+
script:
1338+
- php artisan dusk
1339+
artifacts:
1340+
paths:
1341+
- ./tests/Browser/screenshots
1342+
- ./tests/Browser/console
1343+
expire_in: 7 days

0 commit comments

Comments
 (0)