-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
86 lines (79 loc) · 1.8 KB
/
config.yml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# https://circleci.com/docs/2.0/config-intro/
version: 2.1
orbs:
dt: cci-dep/[email protected]
node: circleci/[email protected]
jobs:
dependency-tracking:
docker:
- image: cimg/base:2021.04
steps:
- checkout
- attach_workspace:
at: .
- run: echo "your pipeline id is << pipeline.id >>"
- dt/track:
pipeline_id: << pipeline.id >>
path: "package-lock.json"
revision: << pipeline.git.revision >>
vcs_url: << pipeline.project.git_url >>
js-build:
docker:
- image: cimg/node:14.18
steps:
- checkout
- node/install-packages
- run:
name: Running JS linting and unit test
command: |
npm run lint:js
npm run test:js
php-lint:
docker:
- image: cimg/php:8.1
steps:
- checkout
- run:
name: Linting PHP
command: |
composer i
composer lint
php-test:
parameters:
php-version-number:
type: string
docker:
- image: cimg/php:<< parameters.php-version-number >>
steps:
- checkout
- run:
name: Testing PHP
command: |
composer i
composer test
e2e-test:
machine:
image: ubuntu-2004:202111-02
steps:
- checkout
- node/install-packages
- run:
name: Running e2e tests
command: |
npm run wp-env start
npm run test:e2e
- store_artifacts:
path: artifacts
workflows:
test-flow:
jobs:
- dependency-tracking
- js-build
- php-lint
- php-test:
requires:
- php-lint
matrix:
parameters:
php-version-number: [ '7.3', '7.4', '8.0', '8.1' ]
- e2e-test