-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbitbucket-pipelines.yml
103 lines (97 loc) · 2.98 KB
/
bitbucket-pipelines.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
clone:
depth: full
definitions:
caches:
pnpmwebapp: $BITBUCKET_CLONE_DIR/.pnpm-store
pnpmcore: $BITBUCKET_CLONE_DIR/.pnpm-store
pnpmapiclient: $BITBUCKET_CLONE_DIR/.pnpm-store
pnpmgraphqlapi: $BITBUCKET_CLONE_DIR/.pnpm-store
scripts:
initializeStep: &initializeStep cp .env.shared .env
&& corepack enable
&& corepack prepare [email protected] --activate
&& export PNPM_HOME="/root/.local/share/pnpm"
&& export PATH="$PNPM_HOME:$PATH"
installWebappDeps: &installWebappDeps pnpm install
--include-workspace-root
--frozen-lockfile
--filter=app...
steps:
- step: &webappTest
name: 'webapp: Lint & test'
image: atlassian/default-image:4
script:
- *initializeStep
- *installWebappDeps
- pnpm nx run app:lint
- pnpm nx run app:type-check
- pnpm nx run app:test --watchAll=false --maxWorkers=20% --coverage
caches:
- pnpmwebapp
- step: &webappBuild
name: 'webapp: Build'
image: atlassian/default-image:4
script:
- *initializeStep
- *installWebappDeps
- pnpm nx run app:build
caches:
- pnpmwebapp
- step: &coreTest
name: 'core: Lint & test'
image: atlassian/default-image:4
script:
- *initializeStep
- pnpm install
--include-workspace-root
--frozen-lockfile
--filter=core...
- pnpm nx run core:lint
- pnpm nx run core:type-check
- pnpm nx run core:test --watchAll=false --maxWorkers=20% --coverage
caches:
- pnpmcore
- step: &apiClientTest
name: 'api-client: Lint & test'
image: atlassian/default-image:4
script:
- *initializeStep
- pnpm install
--include-workspace-root
--frozen-lockfile
--filter=api-client...
- pnpm nx run api-client:lint
- pnpm nx run api-client:type-check
- pnpm nx run api-client:test --watchAll=false --maxWorkers=20% --coverage
caches:
- pnpmapiclient
- step: &graphqlApiTest
name: 'graphql-api: Lint & test'
image: atlassian/default-image:4
script:
- *initializeStep
- pnpm install
--include-workspace-root
--frozen-lockfile
--filter=graphql-api...
- pnpm nx run graphql-api:lint
- pnpm nx run graphql-api:type-check
- pnpm nx run graphql-api:test --watchAll=false --maxWorkers=20% --coverage
caches:
- pnpmgraphqlapi
pipelines:
default:
- parallel:
- step: *webappTest
- step: *webappBuild
- step: *coreTest
- step: *apiClientTest
- step: *graphqlApiTest
branches:
master:
- parallel:
- step: *webappTest
- step: *webappBuild
- step: *coreTest
- step: *apiClientTest
- step: *graphqlApiTest