leo
f129606b8f
All checks were successful
continuous-integration/drone/push Build is passing
* add handlers for signin,singup,logout... * introduce ent ORM and add user schema * add live mode, devel mode to selectively turn on features via config/flags * add templates, handle embedding moar smarter: * live mode uses live folder structure, else embedded templates are used * start using tailwindcss to style stuff * add development goodies for hot-reloading (browser-sync - bs.js) * pimp-up config.dhall with actual custom config Type (enables remote schema and local values only as needed) * add justfile (alternative to makefile for process automation)
183 lines
3.8 KiB
YAML
183 lines
3.8 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: test archlinux
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
trigger:
|
|
branch: [development, "feature-**"]
|
|
event: push
|
|
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
|
|
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
|
|
- git status --porcelain
|
|
# run Go mod tidy prior to committing
|
|
- test -z "$(git status --porcelain)"
|
|
|
|
- name: go fmt
|
|
image: docker.io/immawanderer/archlinux-go:linux-amd64
|
|
depends_on: [go mod tidy]
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
commands:
|
|
- go fmt ./...
|
|
- git status --porcelain
|
|
# unformatted Go code
|
|
- test -z "$(git status --porcelain)"
|
|
|
|
- name: go vet
|
|
image: docker.io/immawanderer/archlinux-go:linux-amd64
|
|
depends_on: [go mod tidy]
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
commands:
|
|
- go vet ./...
|
|
|
|
- name: npm i
|
|
image: docker.io/immawanderer/archlinux-go:linux-amd64
|
|
depends_on: [go fmt, go vet]
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
commands:
|
|
- mkdir -pv static
|
|
- pacman -Sy && pacman -S --noconfirm --needed npm
|
|
- npm i
|
|
- npx tailwindcss -i ./assets/input.css -o ./static/pcmt.css --minify
|
|
|
|
- name: go build
|
|
image: docker.io/immawanderer/archlinux-go:linux-amd64
|
|
depends_on: [go fmt, go vet, npm i]
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
commands:
|
|
- go build -v .
|
|
|
|
- name: go test
|
|
image: docker.io/immawanderer/archlinux-go:linux-amd64
|
|
depends_on: [go fmt, go vet, npm i]
|
|
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
|
|
|
|
trigger:
|
|
branch: [development, "feature-**"]
|
|
event: push
|
|
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
|
|
steps:
|
|
- name: pull
|
|
image: docker.io/library/golang:1.20.3-alpine3.17
|
|
depends_on: [clone]
|
|
commands:
|
|
- go version
|
|
|
|
- name: go mod tidy
|
|
image: docker.io/library/golang:1.20.3-alpine3.17
|
|
depends_on: [pull]
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
commands:
|
|
- go mod tidy
|
|
- apk update -q && apk add -q --no-cache git
|
|
- git status --porcelain
|
|
# run Go mod tidy prior to committing
|
|
- test -z "$(git status --porcelain)"
|
|
|
|
- name: go fmt
|
|
image: docker.io/library/golang:1.20.3-alpine3.17
|
|
depends_on: [go mod tidy]
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
commands:
|
|
- go fmt ./...
|
|
- apk update -q && apk add -q --no-cache git
|
|
- git status --porcelain
|
|
# unformatted Go code
|
|
- test -z "$(git status --porcelain)"
|
|
|
|
- name: go vet
|
|
image: docker.io/library/golang:1.20.3-alpine3.17
|
|
depends_on: [go mod tidy]
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
commands:
|
|
- go vet ./...
|
|
|
|
- name: npm i
|
|
image: docker.io/library/golang:1.20.3-alpine3.17
|
|
depends_on: [go fmt, go vet]
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
commands:
|
|
- mkdir -pv static
|
|
- apk update -q && apk add -q --no-cache npm
|
|
- npm i
|
|
- npx tailwindcss -i ./assets/input.css -o ./static/pcmt.css --minify
|
|
|
|
- name: go build
|
|
image: docker.io/library/golang:1.20.3-alpine3.17
|
|
depends_on: [go fmt, go vet, npm i]
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
commands:
|
|
- go build -v .
|
|
|
|
- name: go test
|
|
image: docker.io/library/golang:1.20.3-alpine3.17
|
|
depends_on: [go fmt, go vet, npm i]
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
commands:
|
|
- go test -cover ./...
|
|
|
|
volumes:
|
|
- name: gopath
|
|
temp: {}
|