49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
trigger:
|
|
branch:
|
|
- master
|
|
event:
|
|
- push
|
|
- pull_request
|
|
|
|
steps:
|
|
- name: lint
|
|
image: golangci/golangci-lint:v1.59-alpine
|
|
# volumes:
|
|
# - name: go-cache
|
|
# path: /.cache/mod
|
|
# - name: golangci-cache
|
|
# path: /.cache/go-build
|
|
commands:
|
|
- golangci-lint run --timeout=5m ./...
|
|
|
|
- name: test
|
|
image: golang:1.24-alpine
|
|
commands:
|
|
- go test -race -cover ./...
|
|
# Шаг сборки и публикации будет добавлен позже
|
|
# - name: build-and-publish
|
|
# image: plugins/docker
|
|
# settings:
|
|
# repo: gitea.mrixs.me/mrixs/yamusic-bot
|
|
# registry: gitea.mrixs.me
|
|
# username:
|
|
# from_secret: gitea_username
|
|
# password:
|
|
# from_secret: gitea_password
|
|
# auto_tag: true
|
|
# platforms:
|
|
# - linux/amd64
|
|
# - linux/arm64
|
|
|
|
# volumes:
|
|
# - name: go-cache
|
|
# host:
|
|
# path: /tmp/cache/go-modules
|
|
# - name: golangci-cache
|
|
# host:
|
|
# path: /tmp/cache/golangci
|