ci: eslint

This commit is contained in:
Marvin Preuss 2021-08-23 12:55:18 +02:00
parent 69c0256439
commit 8a03bb83be
3 changed files with 38 additions and 0 deletions

View File

@ -19,6 +19,26 @@ steps:
depends_on: depends_on:
- tags - 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 - name: test
image: golang:1.16 image: golang:1.16
pull: always pull: always
@ -46,6 +66,8 @@ steps:
- ssh -i ssh -o StrictHostKeyChecking=no root@qemu-alpine poweroff - ssh -i ssh -o StrictHostKeyChecking=no root@qemu-alpine poweroff
- ls -lah /SWAP - ls -lah /SWAP
depends_on: depends_on:
- lint
- lint-js
- test - test
- name: prepare-image - name: prepare-image
@ -57,6 +79,8 @@ steps:
- (cd /tmp; go install -v github.com/goreleaser/goreleaser@v0.169.0) - (cd /tmp; go install -v github.com/goreleaser/goreleaser@v0.169.0)
- make test-integration - make test-integration
depends_on: depends_on:
- lint
- lint-js
- test - test
- create-image - create-image
@ -80,6 +104,8 @@ steps:
commands: commands:
- make build - make build
depends_on: depends_on:
- lint
- lint-js
- test - test
- prepare-image - prepare-image
when: when:
@ -109,6 +135,7 @@ steps:
depends_on: depends_on:
- test - test
- lint - lint
- lint-js
when: when:
event: event:
- tag - tag

2
.gitignore vendored
View File

@ -2,3 +2,5 @@ config.y*
dist/ dist/
.envrc .envrc
tmp/* tmp/*
node_modules/*
package*

View File

@ -60,3 +60,12 @@ grpc-gen:
.PHONY: air .PHONY: air
air: 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