This repository was archived by the owner on Oct 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
68 lines (62 loc) · 1.79 KB
/
.gitlab-ci.yml
File metadata and controls
68 lines (62 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
image: composer:latest
before_script: [composer install]
test:pspec:
before_script:
- apk add autoconf build-base
- pecl install xdebug
- echo 'zend_extension=xdebug' >> /usr/local/etc/php/php-cli.ini
- echo 'memory_limit = 256M' >> /usr/local/etc/php/php-cli.ini
- composer install
script: XDEBUG_MODE=coverage src/bin/pspec spec
coverage: /^Coverage report \(\d+\.\d+%\)/
artifacts:
reports:
junit: junit.xml
test:examples:
script: src/bin/pspec examples
artifacts:
reports:
junit: junit.xml
# Tests the current tests with the latest release
# of PSpec. While newer tests don’t have to be
# backwards compatible, this can indicate breaking
# changes.
test:regression:
script:
- rm -rf src
- cat composer.json | sed s/codingpaws\\/pspec/codingpaws\\/pspec-test/ > composer-new.json
- mv composer-new.json composer.json
- mkdir -p src/Helpers
- touch src/Helpers/globals.php
- composer require codingpaws/pspec
- vendor/bin/pspec
allow_failure: true
rules:
- if: "$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH"
lint:
before_script:
- cd tools/php-cs-fixer
- composer install
- cd ../..
script:
- tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff
pages:
image: ubuntu:latest
before_script:
- apt-get update
- apt-get install wget -y
- wget https://github.com/Doctave/doctave/releases/download/0.4.2/doctave-0.4.2-x86_64-unknown-linux-musl.tar.gz
- tar xvf doctave*.tar.gz
- rm doctave*.tar.gz
- mv doctave*/doctave /bin
script:
- doctave build --release --allow-failed-checks
- mv site public
environment:
name: docs
url: https://codingpaws.gitlab.io/pspec
artifacts:
paths:
- public
rules:
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"