forked from frysztak/orpington-news
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
82 lines (68 loc) · 1.62 KB
/
justfile
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
##
## Run for development (with watch mode)
##
# Run frontend and API
dev: (parallel "web" "api")
[private]
web:
cd frontend && \
cp ../.env.local .env && \
npm run dev
[private]
api:
cd backend && \
cp ../.env.local .env && \
cargo watch -q -x run | bunyan
##
## Run for e2e test development (with watch mode)
##
[private]
web-e2e:
cd frontend && \
cp ../.env.e2e.local .env && \
npm run dev
[private]
api-e2e:
cd backend && \
cp ../.env.e2e.local .env && \
cargo watch -q -x run --features e2e | bunyan
# Run frontend and API for E2E test development
dev-e2e: (parallel "web-e2e" "api-e2e")
# Builds and starts Docker E2E container
docker-e2e:
docker buildx build -f docker/Dockerfile.e2e \
-t orpington-news-e2e:latest \
--build-arg INSTRUMENT_COVERAGE=true \
--build-arg DISABLE_SW=true \
.
docker compose -f docker-compose.e2e.yml up -d
# Opens Cypress (local)
cypress-open:
cd e2e && \
cp ../.env.e2e.local .env && \
npm run cypress:open
# Opens Cypress (Docker)
cypress-open-docker:
cd e2e && \
cp ../.env.e2e .env && \
npm run cypress:open
# Runs Cypress (local)
cypress-run:
cd e2e && \
cp ../.env.e2e.local .env && \
npm run cypress:run
# Runs Cypress (Docker)
cypress-run-docker:
cd e2e && \
cp ../.env.e2e .env && \
npm run cypress:run
# runs jobs in parallel
# thank you https://github.com/casey/just/issues/626#issuecomment-1464811402
# replace with built-in parallel job execution once https://github.com/casey/just/pull/1562 lands
[private]
parallel arg1 arg2:
#!/bin/bash -eux
just {{arg1}} &
just {{arg2}} &
trap 'kill $(jobs -pr)' EXIT
wait