2023-04-12 22:49:10 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: test archlinux
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
2023-04-17 21:57:22 +02:00
|
|
|
node:
|
|
|
|
r: as
|
|
|
|
|
2023-04-12 22:49:10 +02:00
|
|
|
trigger:
|
|
|
|
branch: [development, "feature-**"]
|
|
|
|
event: push
|
|
|
|
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2023-05-04 15:07:07 +02:00
|
|
|
GOPATH: /go
|
2023-04-12 22:49:10 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: pull
|
|
|
|
image: docker.io/immawanderer/archlinux-go:linux-amd64
|
|
|
|
pull: always
|
|
|
|
depends_on: [clone]
|
|
|
|
commands:
|
|
|
|
- go version
|
|
|
|
|
|
|
|
- name: go mod tidy
|
|
|
|
image: docker.io/immawanderer/archlinux-go:linux-amd64
|
|
|
|
depends_on: [pull]
|
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- go mod tidy
|
2023-05-04 15:12:24 +02:00
|
|
|
- git diff-index HEAD :^package-lock.json
|
2023-04-12 22:49:10 +02:00
|
|
|
# run Go mod tidy prior to committing
|
2023-05-04 15:12:24 +02:00
|
|
|
- test -z "$(git diff-index HEAD :^package-lock.json)"
|
2023-04-12 22:49:10 +02:00
|
|
|
|
2023-05-04 15:09:29 +02:00
|
|
|
- name: frontend
|
2023-04-12 22:49:10 +02:00
|
|
|
image: docker.io/immawanderer/archlinux-go:linux-amd64
|
2023-05-04 15:12:24 +02:00
|
|
|
depends_on: [pull]
|
2023-04-13 00:07:08 +02:00
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- pacman -Sy && pacman -S --noconfirm --needed npm
|
|
|
|
- npm i
|
2023-05-08 00:13:33 +02:00
|
|
|
- npx tailwindcss -i ./assets/input/css/tailwind.css -o ./assets/public/css/pcmt.css --minify
|
2023-04-13 00:07:08 +02:00
|
|
|
|
|
|
|
- name: go build
|
|
|
|
image: docker.io/immawanderer/archlinux-go:linux-amd64
|
2023-05-04 15:09:29 +02:00
|
|
|
depends_on: [go mod tidy, frontend]
|
2023-04-12 22:49:10 +02:00
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- go build -v .
|
|
|
|
|
|
|
|
- name: go test
|
|
|
|
image: docker.io/immawanderer/archlinux-go:linux-amd64
|
2023-05-04 15:00:42 +02:00
|
|
|
depends_on: [pull]
|
2023-04-12 22:49:10 +02:00
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- go test -cover ./...
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
temp: {}
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: test alpine
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
2023-04-17 21:57:22 +02:00
|
|
|
node:
|
|
|
|
r: as
|
|
|
|
|
2023-04-12 22:49:10 +02:00
|
|
|
trigger:
|
|
|
|
branch: [development, "feature-**"]
|
|
|
|
event: push
|
|
|
|
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: pull
|
2023-05-05 01:33:36 +02:00
|
|
|
image: docker.io/library/golang:1.20.4-alpine3.17
|
2023-04-12 22:49:10 +02:00
|
|
|
depends_on: [clone]
|
|
|
|
commands:
|
|
|
|
- go version
|
|
|
|
|
|
|
|
- name: go mod tidy
|
2023-05-05 01:33:36 +02:00
|
|
|
image: docker.io/library/golang:1.20.4-alpine3.17
|
2023-04-12 22:49:10 +02:00
|
|
|
depends_on: [pull]
|
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- go mod tidy
|
|
|
|
- apk update -q && apk add -q --no-cache git
|
2023-05-04 15:12:24 +02:00
|
|
|
- git diff-index HEAD :^package-lock.json
|
2023-04-12 22:49:10 +02:00
|
|
|
# run Go mod tidy prior to committing
|
2023-05-04 15:12:24 +02:00
|
|
|
- test -z "$(git diff-index HEAD :^package-lock.json)"
|
2023-04-12 22:49:10 +02:00
|
|
|
|
2023-05-04 15:09:29 +02:00
|
|
|
- name: frontend
|
2023-05-05 01:33:36 +02:00
|
|
|
image: docker.io/library/golang:1.20.4-alpine3.17
|
2023-05-04 15:12:24 +02:00
|
|
|
depends_on: [pull]
|
2023-04-13 00:07:08 +02:00
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- apk update -q && apk add -q --no-cache npm
|
|
|
|
- npm i
|
2023-05-08 00:13:33 +02:00
|
|
|
- npx tailwindcss -i ./assets/input/css/tailwind.css -o ./assets/public/css/pcmt.css --minify
|
2023-04-13 00:07:08 +02:00
|
|
|
|
|
|
|
- name: go build
|
2023-05-05 01:33:36 +02:00
|
|
|
image: docker.io/library/golang:1.20.4-alpine3.17
|
2023-05-04 15:09:29 +02:00
|
|
|
depends_on: [go mod tidy, frontend]
|
2023-04-12 22:49:10 +02:00
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- go build -v .
|
|
|
|
|
|
|
|
- name: go test
|
2023-05-05 01:33:36 +02:00
|
|
|
image: docker.io/library/golang:1.20.4-alpine3.17
|
2023-05-04 15:00:42 +02:00
|
|
|
depends_on: [pull]
|
2023-04-12 22:49:10 +02:00
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- go test -cover ./...
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
temp: {}
|
2023-04-19 23:05:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: golangci-lint|godocs
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
|
|
|
|
node:
|
|
|
|
r: as
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: golangci-lint
|
2023-05-05 01:33:36 +02:00
|
|
|
image: docker.io/library/golang:1.20.4-alpine3.17
|
2023-04-19 23:05:30 +02:00
|
|
|
pull: always
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
commands:
|
|
|
|
- go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
|
|
|
|
- golangci-lint version
|
|
|
|
- golangci-lint run -v --timeout 5m
|
|
|
|
|
|
|
|
- name: goreportcard refresh
|
|
|
|
image: docker.io/curlimages/curl:8.00.1
|
|
|
|
depends_on: [golangci-lint]
|
|
|
|
pull: if-not-exists
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
include:
|
|
|
|
- "refs/tags/**"
|
|
|
|
- refs/heads/development
|
|
|
|
exclude:
|
|
|
|
- "refs/pull/**"
|
|
|
|
commands:
|
|
|
|
- uname -r
|
|
|
|
- curl --version
|
|
|
|
- curl -sS -X POST -F \"repo=git.dotya.ml/${DRONE_REPO}\" https://goreportcard.com/checks -o /dev/null
|
|
|
|
|
|
|
|
- name: godocs refresh
|
|
|
|
image: docker.io/curlimages/curl:8.00.1
|
|
|
|
pull: if-not-exists
|
|
|
|
depends_on: [golangci-lint]
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
include:
|
|
|
|
- "refs/tags/**"
|
|
|
|
- refs/heads/development
|
|
|
|
exclude: ["refs/pull/**"]
|
|
|
|
commands:
|
|
|
|
- uname -r
|
|
|
|
- curl --version
|
|
|
|
- curl -sS -X POST https://godocs.io/git.dotya.ml/${DRONE_REPO}/refresh -o /dev/null
|