forked from metabrainz/musicbrainz-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
93 lines (87 loc) · 3.56 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
87
88
89
90
91
92
93
version: 2.1
executors:
musicbrainz-tests:
docker:
- image: metabrainz/musicbrainz-tests:v-2022-05.5
user: root
working_directory: /home/musicbrainz/musicbrainz-server
jobs:
js-perl-and-pgtap:
executor: musicbrainz-tests
steps:
- restore_cache:
keys:
- v1-source-{{ .Branch }}-{{ .Revision }}
- v1-source-{{ .Branch }}-
- v1-source-
- checkout
- run: |
chown -R musicbrainz:musicbrainz .
# The checkout step configures git to skip gc, so we run it
# here to reduce .git's size before saving it to cache.
sudo -E -H -u musicbrainz git gc
- save_cache:
key: v1-source-{{ .Branch }}-{{ .Revision }}
paths:
- ".git"
- restore_cache:
keys:
- v2-node-{{ checksum "yarn.lock" }}
- v2-node-
- run: |
chown -R musicbrainz:musicbrainz .
sudo -E -H -u musicbrainz yarn
- save_cache:
key: v2-node-{{ checksum "yarn.lock" }}
paths:
- "node_modules"
- run: |
sudo -E -H -u musicbrainz mkdir -p junit_output
sudo -E -H -u musicbrainz cp docker/musicbrainz-tests/DBDefs.pm lib/
rm /etc/service/{postgresql,redis}/down && sv start postgresql redis
sudo -E -H -u musicbrainz carton exec -- ./script/create_test_db.sh
sudo -E -H -u musicbrainz make -C po all_quiet deploy
NODE_ENV=test WEBPACK_MODE=development NO_PROGRESS=1 sudo -E -H -u musicbrainz carton exec -- \
./script/compile_resources.sh client server web-tests
sudo -E -H -u musicbrainz ./node_modules/.bin/flow --quiet
sudo -E -H -u musicbrainz ./node_modules/.bin/eslint --max-warnings 0 .
rm /etc/service/chrome/down && sv start chrome
sudo -E -H -u musicbrainz carton exec -- node \
t/web.js \
| tee >(./node_modules/.bin/tap-junit > ./junit_output/js_web.xml) \
| ./node_modules/.bin/tap-difflet
sv kill chrome
./docker/musicbrainz-tests/add_mbtest_alias.sh
sudo -u postgres createdb -O musicbrainz -T musicbrainz_test -U postgres musicbrainz_test_json_dump
sudo -u postgres createdb -O musicbrainz -T musicbrainz_test -U postgres musicbrainz_test_full_export
sudo -u postgres createdb -O musicbrainz -T musicbrainz_test -U postgres musicbrainz_test_sitemaps
rm /etc/service/{template-renderer,vnu,website}/down && sv start template-renderer vnu website
export MMD_SCHEMA_ROOT=/home/musicbrainz/mb-solr/mmd-schema
export JUNIT_OUTPUT_FILE=junit_output/perl_and_pgtap.xml
sudo -E -H -u musicbrainz carton exec -- prove \
--pgtap-option dbname=musicbrainz_test \
--pgtap-option host=localhost \
--pgtap-option port=5432 \
--pgtap-option username=musicbrainz \
--source pgTAP \
--source Perl \
-I lib \
t/author/* \
t/critic.t \
t/pgtap/* \
t/pgtap/unused-tags/* \
t/script/MergeDuplicateArtistCredits.t \
t/script/BuildSitemaps.t \
t/script/DumpJSON.t \
t/script/ExportAllTables.t \
t/script/dbmirror2.t \
t/tests.t \
--harness=TAP::Harness::JUnit \
-v
- store_test_results:
path: ./junit_output
workflows:
version: 2.1
build-and-test:
jobs:
- js-perl-and-pgtap