forked from camilo/lhm
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathdev.yml
More file actions
48 lines (47 loc) · 1.65 KB
/
dev.yml
File metadata and controls
48 lines (47 loc) · 1.65 KB
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
name: lhm
up:
- packages:
- mysql-client
- wget
- ruby
- bundler
- podman
- custom:
name: Get Appraisal gems
met?: bundle exec appraisal install
meet: ":"
- custom:
name: Podman compose
met?: "[[ $(podman-compose ps | grep -c -e 'running' -e 'Up') == 4 ]] 2> /dev/null"
meet: podman-compose -f docker-compose-mysql-8.0.yml up -d
down: podman-compose down
- 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:
syntax:
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: podman-compose logs -f
clear:
run: podman-compose down -v && podman-compose up -d && ./scripts/helpers/wait-for-dbs.sh
subcommands:
mysql-5.7: podman-compose down -v && podman-compose -f docker-compose-mysql-5.7.yml up -d && ./scripts/helpers/wait-for-dbs.sh
mysql-8.0: podman-compose down -v && podman-compose -f docker-compose-mysql-8.0.yml 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