This repository has been archived by the owner on Dec 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Taskfile.yml
94 lines (94 loc) · 2.11 KB
/
Taskfile.yml
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
# see https://taskfile.dev/#/
version: "3"
output: group
vars:
HOSTNAME:
sh: echo ${HOSTNAME:-localhost}
VERSION:
sh: node -p "require('./package.json').version"
env: &env
FORCE_COLOR: "1"
PRE_COMMIT_COLOR: always
# basically the same thing from .envrc file:
VIRTUAL_ENV: # "{{.VIRTUAL_ENV}}"
sh: echo "${VIRTUAL_ENV:-out/venvs/${HOSTNAME:-localhost}}"
tasks:
default:
desc: Run most commands
deps:
- lint
- test
cmds:
- echo Passed all checks!
setup:
desc: Install dependencies
run: once # avoid duplicate runs as all task depend on this
cmds:
- ./tools/test-setup.sh
- npm ci
sources:
- package-lock.json
- package.json
- tools/test-setup.sh
deps:
desc: Update dependencies
deps:
- setup
cmds:
- source $VIRTUAL_ENV/bin/activate && pip-compile -q --no-header
--no-annotate --output-file=.config/requirements.txt
.config/requirements.in
- npm run deps
- git status --untracked-files --porcelain
lint:
desc: Lint the project
deps:
- setup
env:
PRE_COMMIT_COLOR: always
cmds:
- $VIRTUAL_ENV/bin/python3 -m pre_commit run -a
- task: summary
run: once # avoid duplicate runs as all task depend on this
silent: true
sources:
- "*"
- "*.*"
- ".config"
- ".github"
- ".vscode"
- data
- f/**
- negative_test
- src/**
- test/**
test:
desc: Run all tests
deps:
- setup
- lint
cmds:
- npm run test
- task: summary
sources:
- f/**
- negative_test/**/*.*
- test/**/*.*
- src/**/*.*
- package.json
- package-lock.json
- Taskfile.yml
- tsconfig.json
interactive: true
pr:
desc: Opens a pull request using gh
deps:
- lint
cmds:
- gh pr create
interactive: true
summary:
desc: Ensure that git does not report dirty
cmds:
# https://stackoverflow.com/questions/5139290/how-to-check-if-theres-nothing-to-be-committed-in-the-current-branch
- git diff --exit-code