This repository has been archived by the owner on May 29, 2023. It is now read-only.
forked from Automattic/wp-calypso
-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
38 lines (38 loc) · 1.76 KB
/
circle.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
machine:
node:
version: 6.9.1
test:
pre:
- NODE_ENV=test make client/config/index.js:
parallel: true
- ? |
# make the build-server and i18n string data in parallel
if [[ "$CIRCLE_NODE_INDEX" == 0 ]]; then NODE_ENV=test make build-server; fi
if ( [[ "$CIRCLE_NODE_INDEX" == 1 ]] || [[ "$CIRCLE_NODE_TOTAL" == 1 ]] ) && [[ "$CIRCLE_BRANCH" == "master" ]]; then
make translate; mkdir -p $CIRCLE_ARTIFACTS/translate; mv calypso-strings.pot $CIRCLE_ARTIFACTS/translate
elif [[ "$CIRCLE_NODE_INDEX" == 1 ]] || [[ "$CIRCLE_NODE_TOTAL" == 1 ]]; then
git clone https://github.com/Automattic/gp-localci-client.git
bash gp-localci-client/generate-new-strings-pot.sh $CIRCLE_BRANCH $CIRCLE_SHA1 $CIRCLE_ARTIFACTS/translate
rm -rf gp-localci-client
fi
: parallel: true
override:
- bin/run-lint :
parallel: true
files:
- client/**/*.js
- client/**/*.jsx
- server/**/*.js
- server/**/*.jsx
- MOCHA_FILE=./test-results-client.xml npm run test-client -- -R mocha-junit-reporter -t $CIRCLE_NODE_TOTAL -i $CIRCLE_NODE_INDEX:
parallel: true
- MOCHA_FILE=./test-results-server.xml npm run test-server -- -R mocha-junit-reporter -t $CIRCLE_NODE_TOTAL -i $CIRCLE_NODE_INDEX:
parallel: true
- MOCHA_FILE=./test-results-test.xml npm run test-test -- -R mocha-junit-reporter -t $CIRCLE_NODE_TOTAL -i $CIRCLE_NODE_INDEX:
parallel: true
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/ && find . -type f -regex "./test-results.*\.xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;:
parallel: true
notify:
webhooks:
- url: https://translate.wordpress.com/api/localci/-relay-new-strings-to-gh