diff --git a/.drone.yml b/.drone.yml index 60ce01a..1470fa5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,6 +19,26 @@ steps: depends_on: - tags + - name: lint-js + image: alpine:3.14 + commands: + - > + apk add + make + nodejs + npm + - > + npm install + eslint + prettier + eslint-plugin-prettier + eslint-config-prettier + - export PATH=$PWD/node_modules/.bin:$PATH + - make lint-js + - make clean + depends_on: + - tags + - name: test image: golang:1.16 pull: always @@ -46,6 +66,8 @@ steps: - ssh -i ssh -o StrictHostKeyChecking=no root@qemu-alpine poweroff - ls -lah /SWAP depends_on: + - lint + - lint-js - test - name: prepare-image @@ -57,6 +79,8 @@ steps: - (cd /tmp; go install -v github.com/goreleaser/goreleaser@v0.169.0) - make test-integration depends_on: + - lint + - lint-js - test - create-image @@ -80,6 +104,8 @@ steps: commands: - make build depends_on: + - lint + - lint-js - test - prepare-image when: @@ -109,6 +135,7 @@ steps: depends_on: - test - lint + - lint-js when: event: - tag diff --git a/.gitignore b/.gitignore index aaf6e10..32427a9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ config.y* dist/ .envrc tmp/* +node_modules/* +package* diff --git a/Makefile b/Makefile index db2f6c9..5992133 100644 --- a/Makefile +++ b/Makefile @@ -60,3 +60,12 @@ grpc-gen: .PHONY: air air: air + +.PHONY: drone-local +drone-local: + drone exec --trusted --timeout 5h + +.PHONY: clean +clean: + rm -rf node_modules + rm -rf package* || exit 0