ci: switch to Gitea actions
This commit is contained in:
parent
80e3921695
commit
59ae8a9c6f
4 changed files with 61 additions and 53 deletions
52
.drone.yml
52
.drone.yml
|
@ -1,52 +0,0 @@
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: default
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
||||||
- tag
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Lint
|
|
||||||
image: docker.io/golangci/golangci-lint:latest
|
|
||||||
environment:
|
|
||||||
GO111MODULE: "on"
|
|
||||||
CGO_ENABLED: "0"
|
|
||||||
GOMEMLIMIT: "1150MiB"
|
|
||||||
commands:
|
|
||||||
- golangci-lint run -v
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
image: docker.io/golang:1.20-buster
|
|
||||||
commands:
|
|
||||||
- go mod download
|
|
||||||
- go run gotest.tools/gotestsum@latest -f pkgname-and-test-fails -- -race -shuffle=on ./...
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: housekeeping
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- cron
|
|
||||||
cron:
|
|
||||||
- housekeeping
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Renovate
|
|
||||||
image: code.icb4dc0.de/prskr/ci-images/renovate:latest
|
|
||||||
commands:
|
|
||||||
- renovate "${DRONE_REPO}"
|
|
||||||
environment:
|
|
||||||
RENOVATE_TOKEN:
|
|
||||||
from_secret: gitea_token
|
|
||||||
GITHUB_COM_TOKEN:
|
|
||||||
from_secret: github_token
|
|
||||||
RENOVATE_PLATFORM: gitea
|
|
||||||
RENOVATE_AUTODISCOVER: "false"
|
|
||||||
RENOVATE_ENDPOINT: https://code.icb4dc0.de/api/v1
|
|
||||||
LOG_LEVEL: info
|
|
38
.gitea/workflows/go.yaml
Normal file
38
.gitea/workflows/go.yaml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
name: Go build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go-version: [ 1.20.x, 1.21.x]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: '0'
|
||||||
|
lfs: 'true'
|
||||||
|
fetch-tags: 'true'
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
# Semantic version range syntax or exact version of Go
|
||||||
|
go-version: ${{ matrix.go-version }}
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: golangci/golangci-lint-action@v3
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: "0"
|
||||||
|
GOMEMLIMIT: "1150MiB"
|
||||||
|
- name: Install gotestsum
|
||||||
|
run: go install gotest.tools/gotestsum@latest
|
||||||
|
- name: Run tests
|
||||||
|
run: gotestsum -f pkgname-and-test-fails -- -race -shuffle=on ./...
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: "1"
|
||||||
|
GOMEMLIMIT: "150MiB"
|
22
.gitea/workflows/renovate.yaml
Normal file
22
.gitea/workflows/renovate.yaml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
name: Renovate
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
schedule:
|
||||||
|
- cron: '25 2 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
renovate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: docker://code.icb4dc0.de/infrastructure/images/renovate:latest
|
||||||
|
with:
|
||||||
|
args: renovate "${{ github.repository }}"
|
||||||
|
env:
|
||||||
|
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
|
GITHUB_COM_TOKEN: ${{ secrets.RENOVATE_GITHUB_TOKEN }}
|
||||||
|
RENOVATE_PLATFORM: gitea
|
||||||
|
RENOVATE_AUTODISCOVER: "false"
|
||||||
|
RENOVATE_ENDPOINT: https://code.icb4dc0.de/api/v1
|
||||||
|
LOG_LEVEL: info
|
2
go.mod
2
go.mod
|
@ -1,3 +1,3 @@
|
||||||
module code.icb4dc0.de/prskr/gapr
|
module code.icb4dc0.de/prskr/gapr
|
||||||
|
|
||||||
go 1.18
|
go 1.20
|
||||||
|
|
Loading…
Reference in a new issue