diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index e2a8e6a..0000000 --- a/.drone.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.gitea/workflows/go.yaml b/.gitea/workflows/go.yaml new file mode 100644 index 0000000..7d5f307 --- /dev/null +++ b/.gitea/workflows/go.yaml @@ -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" diff --git a/.gitea/workflows/renovate.yaml b/.gitea/workflows/renovate.yaml new file mode 100644 index 0000000..5d17fa5 --- /dev/null +++ b/.gitea/workflows/renovate.yaml @@ -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 diff --git a/go.mod b/go.mod index 8fe752e..49cb7cf 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module code.icb4dc0.de/prskr/gapr -go 1.18 +go 1.20