Skip to content

Commit 7133677

Browse files
committed
CI: Add build & test configuration
1 parent b6ce0b8 commit 7133677

File tree

1 file changed

+55
-9
lines changed

1 file changed

+55
-9
lines changed

.circleci/config.yml

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,60 @@
11
version: 2.1
22

33
jobs:
4-
build:
5-
docker:
6-
- image: circleci/php:7.3-cli-buster
7-
steps:
8-
- checkout
9-
- run: echo "test"
4+
build:
5+
docker:
6+
- image: akeneo/php:7.2
7+
steps:
8+
- checkout
9+
- run: composer install
10+
- persist_to_workspace:
11+
root: ~/
12+
paths:
13+
- project
14+
15+
test_php:
16+
docker:
17+
- image: akeneo/php:7.2
18+
steps:
19+
- attach_workspace:
20+
at: ~/
21+
- run: bin/phpunit -c phpunit.xml.dist
22+
- run: bin/phpspec run
23+
24+
test_php_code_style:
25+
docker:
26+
- image: akeneo/php:7.2
27+
steps:
28+
- attach_workspace:
29+
at: ~/
30+
- run: bin/php-cs-fixer fix --diff --dry-run --config=.php_cs.php -vvv
1031

1132
workflows:
12-
build_and_test:
13-
jobs:
14-
- build
33+
pull_request:
34+
jobs:
35+
- wait_for_user_approval:
36+
type: approval
37+
filters:
38+
branches:
39+
ignore:
40+
- master
41+
- build:
42+
requires:
43+
- wait_for_user_approval
44+
- test_php:
45+
requires:
46+
- build
47+
- test_php_code_style:
48+
requires:
49+
- build
50+
51+
nightly:
52+
when:
53+
and:
54+
- equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
55+
- equal: [ "nightly_master", << pipeline.schedule.name >> ]
56+
jobs:
57+
- build
58+
- test_php:
59+
requires:
60+
- build

0 commit comments

Comments
 (0)