-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (86 loc) · 2.42 KB
/
Copy pathdocker-compose.yml
File metadata and controls
93 lines (86 loc) · 2.42 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
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
# Qbitel EdgeOS - Docker Compose for development and CI
# Usage:
# docker compose up builder # Run full build
# docker compose run test # Run tests
# docker compose run lint # Run linters
# docker compose run audit # Run security audit
services:
builder:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/workspace
- cargo-cache:/usr/local/cargo/registry
- cargo-git:/usr/local/cargo/git
- target-cache:/workspace/target
command: make build
environment:
- CARGO_HOME=/usr/local/cargo
- CARGO_TARGET_DIR=/workspace/target
test:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/workspace
- cargo-cache:/usr/local/cargo/registry
- cargo-git:/usr/local/cargo/git
- target-cache:/workspace/target
command: make test
environment:
- CARGO_HOME=/usr/local/cargo
- RUST_BACKTRACE=1
lint:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/workspace
- cargo-cache:/usr/local/cargo/registry
- cargo-git:/usr/local/cargo/git
- target-cache:/workspace/target
command: >
sh -c "cargo fmt --all -- --check &&
cargo clippy --workspace --all-features -- -D warnings &&
cargo deny check"
audit:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/workspace
- cargo-cache:/usr/local/cargo/registry
- cargo-git:/usr/local/cargo/git
command: >
sh -c "cargo audit &&
cargo deny check advisories &&
cargo geiger --all-features --all-targets"
coverage:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/workspace
- cargo-cache:/usr/local/cargo/registry
- cargo-git:/usr/local/cargo/git
- target-cache:/workspace/target
command: >
cargo tarpaulin --workspace --out xml --out html
--output-dir /workspace/coverage
--exclude-files "tests/*" "examples/*" "benches/*"
environment:
- CARGO_HOME=/usr/local/cargo
python-test:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/workspace
command: >
sh -c "cd /workspace/tools/q-provision && pip install -e '.[dev]' && pytest tests/ -v --cov &&
cd /workspace/tools/q-sign && pip install -e '.[dev]' && pytest tests/ -v --cov"
volumes:
cargo-cache:
cargo-git:
target-cache: