test: add an integration test for embedded runner cache (#889)

Adds a limited integration test in the runner which verifies that the embedded cache server starts up, can be written to by an action, and can be read by a subsequent action.  This is a solid base foundation for future nearly-end-to-end tests.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/889): <!--number 889 --><!--line 0 --><!--description dGVzdDogYWRkIGFuIGludGVncmF0aW9uIHRlc3QgZm9yIGVtYmVkZGVkIHJ1bm5lciBjYWNoZQ==-->test: add an integration test for embedded runner cache<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/889
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
This commit is contained in:
Mathieu Fenniak 2025-08-20 19:46:03 +00:00 committed by earl-warren
parent 22762480d8
commit 91e7940947
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201
3 changed files with 223 additions and 1 deletions

View file

@ -149,6 +149,44 @@ jobs:
go test ./act/container
go test -timeout 30m ./act/runner/...
runner-integration-tests:
name: runner integration tests
if: vars.ROLE == 'forgejo-coding'
runs-on: lxc-bookworm
needs: [build-and-tests]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: install docker
run: |
mkdir /etc/docker
cat > /etc/docker/daemon.json <<EOF
{
"ipv6": true,
"experimental": true,
"ip6tables": true,
"fixed-cidr-v6": "fd05:d0ca:1::/64",
"default-address-pools": [
{
"base": "172.19.0.0/16",
"size": 24
},
{
"base": "fd05:d0ca:2::/104",
"size": 112
}
]
}
EOF
apt --quiet install --yes -qq docker.io make
- run: make integration-test
validate-mocks:
name: validate mocks
if: vars.ROLE == 'forgejo-coding'