mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-11 03:51:46 +02:00
Restore the toolchain pin renovate dropped. The go directive has to lose its patch version for that: go removes a toolchain equal to it, and every go command then refuses to run until go.mod is tidied. Go 1.27 changes the flate encoder, so the sizes and checksums pinned by package tests move with the compressed output. Hash the avatar test input directly instead of a png, which has no bearing on what it asserts. encoding/json v2 is no longer an experiment, so drop the v1 implementation and GOEXPERIMENT=jsonv2 with it. Assisted-by: Claude Code:Opus 5
98 lines
2.9 KiB
YAML
98 lines
2.9 KiB
YAML
# Populates main's cache scope so PR runs warm-start from it. Caches are ref-scoped:
|
|
# PR runs read their own scope then fall back to the base branch, and only this
|
|
# workflow saves, so push-to-main is the only chance to populate the fallback scope.
|
|
|
|
name: cache-seeder
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "go.mod" # a toolchain bump invalidates the build caches
|
|
- "go.sum"
|
|
- ".golangci.yml"
|
|
- "pnpm-lock.yaml"
|
|
- "pyproject.toml"
|
|
- "uv.lock"
|
|
- ".github/actions/go-cache/action.yml"
|
|
- ".github/actions/go-setup/action.yml"
|
|
- ".github/actions/node-setup/action.yml"
|
|
- ".github/actions/python-setup/action.yml"
|
|
- ".github/workflows/cache-seeder.yml"
|
|
|
|
concurrency:
|
|
group: cache-seeder
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
gobuild:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
- uses: ./.github/actions/go-setup
|
|
- run: make deps-backend deps-tools
|
|
- run: TAGS="bindata" make backend
|
|
- run: TAGS="bindata gogit" make backend
|
|
- name: warm test compile cache (bindata)
|
|
env:
|
|
TAGS: bindata
|
|
GOTEST_FLAGS: -race -list=^$$ -count=1
|
|
run: make test-backend
|
|
- name: warm test compile cache (bindata gogit)
|
|
env:
|
|
TAGS: bindata gogit
|
|
GOTEST_FLAGS: -race -list=^$$ -count=1
|
|
run: make test-backend
|
|
- name: warm integration compile cache
|
|
run: |
|
|
TAGS="bindata" make test-integration-compile
|
|
TAGS="bindata gogit" make test-integration-compile
|
|
TAGS="bindata gogit" GOTEST_FLAGS="-race" make test-integration-compile
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { tags: "bindata", target: "lint-backend" }
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
- uses: ./.github/actions/go-setup
|
|
with:
|
|
lint-cache: "true"
|
|
- run: make deps-backend deps-tools
|
|
- run: make generate-go
|
|
env:
|
|
TAGS: ${{ matrix.tags }}
|
|
- run: make "$TARGET"
|
|
env:
|
|
TAGS: ${{ matrix.tags }}
|
|
TARGET: ${{ matrix.target }}
|
|
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
- uses: ./.github/actions/node-setup
|
|
- run: make deps-frontend
|
|
|
|
python:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
- uses: ./.github/actions/python-setup
|
|
- run: make deps-py
|
|
|
|
# reclaims the caches this run superseded, so the next save still fits in the allowance
|
|
prune:
|
|
needs: [gobuild, lint, frontend, python]
|
|
permissions:
|
|
actions: write
|
|
uses: ./.github/workflows/cache-prune.yml
|