mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-07 07:40:29 +00:00
Like Gitea's CI, only a `cache-seeder` workflow on main saves the go caches, all other jobs only restore them. Caches are scoped per repository, so until now any pull request, forks included, could write a cache that other runs restore. The seeder compiles the tests without running them, so no test result is ever cached. Reviewed-on: https://gitea.com/gitea/runner/pulls/1350 Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: silverwind <[email protected]>
27 lines
632 B
YAML
27 lines
632 B
YAML
name: cache-seeder
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- go.mod
|
|
- go.sum
|
|
- .golangci.yml
|
|
- Makefile
|
|
- .gitea/actions/go-setup/action.yml
|
|
- .gitea/workflows/cache-seeder.yml
|
|
|
|
jobs:
|
|
seed:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
- uses: ./.gitea/actions/go-setup
|
|
- run: make deps-tools lint build
|
|
- name: compile the test binaries without running them
|
|
run: |
|
|
make test GOTEST_FLAGS='-race -exec true'
|
|
go test -tags e2e -exec true ./e2e/...
|