diff options
author | silverwind <me@silverwind.io> | 2020-03-29 13:56:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-29 12:56:58 +0100 |
commit | ad4026431b155cb7007bd7b0eaecc33a792efe0b (patch) | |
tree | a272fba1c4adf439a2c3ff233422c33d24527ea8 /.drone.yml | |
parent | 3f0cb8b33a6e96a12498c9d5c2ae8dda44a13a62 (diff) | |
download | gitea-ad4026431b155cb7007bd7b0eaecc33a792efe0b.tar.gz gitea-ad4026431b155cb7007bd7b0eaecc33a792efe0b.zip |
Add 'make lint', restructure 'compliance' pipeline (#10861)
- Added 'lint', 'lint-frontend', 'lint-backend' targets
- Added 'lint-frontend', 'lint-backend' ci steps and restructure the
'compliance' pipeline to have a clear separation between frontend and
backend and use parallelism where possible. Also, the main build
pipelines now depend on 'compliance' so they will skip if it fails.
- Added dependencies on ci steps so they skip when 'compliance' fails
- Moved JS linters to devDependencies
- Removed deprecated 'js' and 'css' targets
Diffstat (limited to '.drone.yml')
-rw-r--r-- | .drone.yml | 55 |
1 files changed, 39 insertions, 16 deletions
diff --git a/.drone.yml b/.drone.yml index b85d52b015..8dd673f19e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,13 +11,37 @@ workspace: path: src/code.gitea.io/gitea steps: - - name: pre-build + - name: deps-frontend + pull: always + image: node:12 + commands: + - make node_modules + + - name: lint-frontend + pull: always + image: node:12 + commands: + - make lint-frontend + depends_on: [deps-frontend] + + - name: lint-backend + pull: always + image: golang:1.14 + commands: + - make lint-backend + environment: + GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not + GOSUMDB: sum.golang.org + TAGS: bindata sqlite sqlite_unlock_notify + + - name: build-frontend pull: always image: node:10 # this step is kept at the lowest version of node that we support commands: - - make webpack + - make frontend + depends_on: [lint-frontend] - - name: build-without-gcc + - name: build-backend-no-gcc pull: always image: golang:1.12 # this step is kept as the lowest version of golang that we support environment: @@ -25,8 +49,9 @@ steps: GOPROXY: off commands: - go build -mod=vendor -o gitea_no_gcc # test if build succeeds without the sqlite tag + depends_on: [lint-backend] - - name: build-linux-386 + - name: build-backend-386 pull: always image: golang:1.14 environment: @@ -36,16 +61,7 @@ steps: GOARCH: 386 commands: - go build -mod=vendor -o gitea_linux_386 # test if compatible with 32 bit - - - name: check - pull: always - image: golang:1.14 - commands: - - make clean golangci-lint revive swagger-check swagger-validate test-vendor - environment: - GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not - GOSUMDB: sum.golang.org - TAGS: bindata sqlite sqlite_unlock_notify + depends_on: [lint-backend] --- kind: pipeline @@ -55,6 +71,9 @@ platform: os: linux arch: amd64 +depends_on: + - compliance + workspace: base: /go path: src/code.gitea.io/gitea @@ -209,8 +228,6 @@ steps: - push - pull_request - - --- kind: pipeline name: testing-arm64 @@ -219,6 +236,9 @@ platform: os: linux arch: arm64 +depends_on: + - compliance + workspace: base: /go path: src/code.gitea.io/gitea @@ -537,6 +557,9 @@ platform: os: linux arch: arm64 +depends_on: + - compliance + steps: - name: build-docs pull: always |