forked from ansible/ansible-language-server
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace tox with taskfile as build tool
As neither tox nor npm are really suitable as build build, especially for mixed (ts/py) projects, we start using a task. Related: ansible/vscode-ansible#511 Related: ansible/schemas#311
- Loading branch information
Showing
5 changed files
with
132 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ autoupdate | |
backticks | ||
cacheable | ||
chronographer | ||
cmds | ||
codeclimate | ||
codecov | ||
commitish | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# see https://taskfile.dev/#/ | ||
version: "3" | ||
output: group | ||
vars: | ||
VERSION: | ||
sh: node -p "require('./package.json').version" | ||
tasks: | ||
default: | ||
desc: Run most commands | ||
deps: | ||
- lint | ||
# - package | ||
cmds: | ||
- echo Done {{.VERSION}}! | ||
docs: | ||
desc: Build the documentation | ||
vars: | ||
envdir: ../.tox/docs | ||
temp_dir: ../.tox/docs/tmp | ||
sphinx_common_args: '-j auto --color -a -n -W --keep-going -T -d "{{.temp_dir}}/.doctrees" . "{{.envdir}}/docs_out"' | ||
dir: docs | ||
cmds: | ||
- python3 -m venv .tox/docs | ||
- > | ||
source ../.tox/docs/bin/activate && | ||
pip install "..[docs]" && | ||
python -m sphinx -b html {{.sphinx_common_args}} | ||
setup: | ||
desc: Install dependencies | ||
cmds: | ||
- bash ./tools/test-setup.sh | ||
- python3 -m pip install --user pre-commit | ||
- npm ci | ||
sources: | ||
- bash tools/test-setup.sh | ||
- package.json | ||
- package-lock.json | ||
build: | ||
desc: Build the project | ||
deps: | ||
- setup | ||
cmds: | ||
- npm run compile && sleep 1 | ||
sources: | ||
- package-lock.json | ||
- package.json | ||
- src/ | ||
- tsconfig.json | ||
- webpack.config.js | ||
code: | ||
desc: Forced install of extension in your code instance | ||
deps: | ||
- package | ||
cmds: | ||
- npm run package && code --force --install-extension *.vsix | ||
deps: | ||
desc: Update dependencies | ||
deps: | ||
- setup | ||
cmds: | ||
- bash -c "PIP_CONSTRAINTS= pip-compile -q --extra docs --extra test --strip-extras --no-annotate setup.cfg -o requirements.txt" | ||
- python3 -m pre_commit autoupdate | ||
# bumps some developments dependencies | ||
- npx ncu -u --dep dev | ||
# running install after ncu is needed in order to update the lock file | ||
- npm install | ||
lint: | ||
desc: Lint the project | ||
deps: | ||
- setup | ||
env: | ||
PRE_COMMIT_COLOR: always | ||
cmds: | ||
- python3 -m pre_commit run -a | ||
silent: true | ||
sources: | ||
- "*.*" | ||
- .config | ||
- .github | ||
- .vscode | ||
- doc | ||
- examples | ||
- images | ||
- src | ||
- syntaxes | ||
- test | ||
- tools | ||
test: | ||
desc: Run all tests | ||
deps: | ||
- setup | ||
cmds: | ||
- npm run test | ||
interactive: true | ||
test-with-ee: | ||
desc: Run only ee tests | ||
deps: | ||
- setup | ||
cmds: | ||
- npm run test-with-ee | ||
interactive: true | ||
test-without-ee: | ||
desc: Run only non-ee tests | ||
deps: | ||
- setup | ||
cmds: | ||
- npm run test-without-ee | ||
interactive: true | ||
package: | ||
desc: Package extension | ||
deps: | ||
- build | ||
sources: | ||
- CHANGELOG.md | ||
- README.md | ||
- package*.json | ||
- out/ | ||
generates: | ||
- "*.vsix" | ||
cmds: | ||
- rm -f *.tgz | ||
- npm pack | ||
silent: false | ||
pr: | ||
desc: Opens a pull request using gh | ||
deps: | ||
- lint | ||
cmds: | ||
- gh pr create | ||
interactive: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters