-
Notifications
You must be signed in to change notification settings - Fork 221
/
Taskfile.yaml
69 lines (57 loc) · 1.92 KB
/
Taskfile.yaml
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
version: "3"
includes:
bindings-python:
taskfile: ./bindings/prqlc-python
dir: ./bindings/prqlc-python
vars:
packages_core: -p prqlc-parser -p prqlc
packages_addon: -p prqlc-macros -p compile-files
packages_bindings: -p prql -p prql-java -p prqlc-js -p prqlc-c -p prqlc-python
tasks:
fmt:
desc:
Format prqlc source files. (Duplicates `pre-commit` checks, but some
developers prefer to use this directly.)
cmds:
- cmd: |
# remove trailing whitespace
rg '\s+$' --files-with-matches --glob '!*.{rs,snap}' . \
| xargs -I _ sh -c "echo Removing trailing whitespace from _ && sd '[\t ]+$' '' _"
- cmd: |
# rustfmt
cargo fmt {{.packages_core}} {{.packages_addon}} {{.packages_bindings}}
- cmd: |
# no dbg
rg 'dbg!' --glob '*.rs' . --no-heading
ignore_error: true
- cmd: |
prettier --write . \
--config=../.prettierrc.yaml \
--ignore-path=../.prettierignore \
--ignore-unknown \
--log-level=warn
test-fast:
desc: A fast test used for feedback during compiler development
cmds:
- cmd: |
INSTA_FORCE_PASS=1 cargo nextest run {{.packages_core}} --no-fail-fast
- cmd: cargo insta review
- cmd: cargo clippy --all-targets {{.packages_core}}
test:
desc: |
A full test of prqlc (excluding --test-dbs-external).
Generates coverage report.
cmds:
- cmd: |
cargo \
llvm-cov --lcov --output-path lcov.info \
nextest --features=test-dbs \
{{.packages_core}} {{.packages_addon}} {{.packages_bindings}}
- cmd:
cargo clippy --all-targets {{.packages_core}} {{.packages_addon}}
{{.packages_bindings}} -- -D warnings
pull-request:
desc: Most checks that run within GH actions for a pull request
cmds:
- task: fmt
- task: test