forked from Shopify/lhm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdev.yml
45 lines (44 loc) · 1.41 KB
/
dev.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
name: lhm
up:
- homebrew:
- mysql-client@5.7:
or: [mysql@5.7]
conflicts: [shopify/shopify/mysql-client, mysql-connector-c, mysql, mysql-client]
- wget
- ruby: 2.7.5
- bundler
- custom:
name: Get Appraisal gems
met?: bundle exec appraisal install
meet: ":"
- docker
- custom:
name: Docker Compose
met?: docker compose ls | grep -ioE -q "lhm.*running\(4\)"
meet: docker compose up -d
- custom:
name: Waiting for DBs to be operational
met?: ./scripts/helpers/wait-for-dbs.sh
meet: ":"
commands:
unit: bundle exec rake unit
int: bundle exec rake integration
test:
optional: file
aliases: [ t ]
run: |
if [[ $# -eq 0 ]]; then
bundle exec rake unit && bundle exec rake integration
else
SINGLE_TEST="$@" bundle exec rake dev
fi
appraisals: bundle exec appraisal rake specs
cov: rm -rf coverage; COV=1 bundle exec rake unit && bundle exec rake integration; open coverage/index.html
logs:
desc: "See the DB logs (ctrl-c + ctrl-c to exit)"
run: docker-compose logs -f
clear:
run: docker-compose rm -v -s -f && docker-compose up -d && ./scripts/helpers/wait-for-dbs.sh
pre-publish:
# Ensures all Gemfile.lock are sync with the new version in `lhm/version.rb` and runs appraisals
run: bundle install && bundle exec appraisal install && bundle exec appraisal rake specs