-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
121 lines (108 loc) · 3.67 KB
/
Copy pathTaskfile.yml
File metadata and controls
121 lines (108 loc) · 3.67 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: '3'
includes:
docs:
taskfile: https://raw.githubusercontent.com/soltiHQ/actions/v1/taskfiles/docs/Taskfile.yml
rust:
taskfile: https://raw.githubusercontent.com/soltiHQ/actions/v1/taskfiles/rust/Taskfile.yml
vars:
docs_version:
sh: sed -n 's/^version[[:space:]]*=[[:space:]]*"\([^"]*\)"/\1/p' Cargo.toml | head -n 1
tasks:
ci/fmt:
desc: Run 'cargo fmt --check'.
cmds:
- task: rust:fmt
ci/check:
desc: Run 'cargo check' on the declared MSRV.
cmds:
- task: rust:check
vars: { CHECK_ARGS: '--all-targets --all-features --locked' }
ci/clippy:
desc: "Run 'cargo clippy' for one feature set. FEATURE = none|all|<feature-name> (default: all)."
vars:
FEATURE: '{{.FEATURE | default "all"}}'
FEATURE_FLAGS:
sh: |
case "{{.FEATURE}}" in
none) echo '--no-default-features' ;;
all) echo '--all-features' ;;
*) echo "--no-default-features --features {{.FEATURE}}" ;;
esac
cmds:
- task: rust:clippy
vars: { CLIPPY_ARGS: '--all-targets {{.FEATURE_FLAGS}} --locked -- -D warnings' }
ci/test:
desc: Run 'cargo test' (all targets, all features).
cmds:
- task: rust:test
vars: { TEST_ARGS: '--all-features --locked' }
ci/test-unit:
desc: Run unit tests ('cargo test --lib').
cmds:
- task: rust:test
vars: { TEST_ARGS: '--lib --all-features --locked' }
ci/test-integration:
desc: Run integration tests ('cargo test --test "*"').
cmds:
- task: rust:test
vars: { TEST_ARGS: '--test "*" --all-features --locked' }
ci/audit:
desc: Run 'cargo audit'.
cmds:
- task: rust:audit
ci/docs:
desc: Validate API documentation and the versioned user guide.
cmds:
- task: rust:doc
vars: { DOC_ARGS: '--locked --no-deps' }
- task: rust:doc
vars: { DOC_ARGS: '--locked --no-deps --all-features' }
- task: docs:api/generate
vars:
RUSTDOC_DIR: .cache/target/doc/taskvisor
API_OUTPUT: .cache/docs/api.json
PRODUCT: taskvisor
PACKAGE: taskvisor
VERSION: '{{.docs_version}}'
- task: rust:docs
vars: { DOCS_ARGS: '--all-features --locked' }
- task: docs:validate
vars:
VERSION: '{{.docs_version}}'
PRODUCT: taskvisor
TITLE: Taskvisor
REPOSITORY: https://github.com/soltiHQ/taskvisor
VERSION_PROVIDER: cargo
VERSION_PACKAGE: taskvisor
REFERENCE_LABEL: API reference
REFERENCE_URL: https://docs.rs/taskvisor/{version}/taskvisor/
CARGO_SNIPPET_SOURCES: README.md docs/installation.md docs/quick-start.md
LINK_SOURCES: docs README.md guide.md src/lib.rs examples/README.md
- task: docs:links/external
vars:
LINK_SOURCES: docs README.md guide.md src/lib.rs examples/README.md
- task: rust:test
vars: { TEST_ARGS: '--doc --all-features --locked' }
ci/build:
desc: Build all examples for a package. Pass CRATE.
requires:
vars: [ CRATE ]
cmds:
- task: rust:build
vars:
CRATE: '{{.CRATE}}'
BUILD_ARGS: '--examples --all-features --locked'
ci/publish-dry-run:
desc: Simulate 'cargo publish' for the taskvisor crate.
cmds:
- task: rust:publish-dry-run
vars:
CRATE: "taskvisor"
PUBLISH_ARGS: '--all-features --locked'
rust:benchmark:
desc: Run all Taskvisor benchmarks with the colorized performance report.
cmds:
- task: rust:bench
vars:
BENCH_ARGS: >-
--bench '*' --features controller --locked -- --quiet --color always