Compare commits

...
Sign in to create a new pull request.

374 commits

Author SHA1 Message Date
Renovate Bot
10e19db366 Replace Node.js with data.forgejo.org/oci/node 24-trixie (#1604)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [data.forgejo.org/oci/node](https://hub.docker.com/_/node) ([source](https://github.com/nodejs/docker-node)) | container | replacement | `24-bookworm` → `24-trixie` |

This is a special PR that replaces `data.forgejo.org/oci/node` with the community suggested minimal stable replacement version.

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41LjAiLCJ1cGRhdGVkSW5WZXIiOiI0My41LjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1604
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-02-21 02:15:00 +00:00
Renovate Bot
d0470cb8ea
Update Node.js to v24 (#1594)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1594
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-02-20 11:53:05 +00:00
Renovate Bot
1b43342fa0
Update dependency go to v1.25 (#1597)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1597
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-02-19 14:26:22 +00:00
viceice
68e5105bfe
chore(renovate): typo 2026-02-19 11:00:40 +00:00
Renovate Bot
ea59d6dbab
Update https://data.forgejo.org/actions/setup-forgejo action to v3.1.6 (#1591)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1591
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-02-19 10:58:31 +00:00
viceice
83c2cbcfad
chore(renovate): separate test actions (#1595)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1595
Co-authored-by: viceice <michael.kriese@gmx.de>
Co-committed-by: viceice <michael.kriese@gmx.de>
2026-02-19 10:57:55 +00:00
Renovate Bot
be5b4438fa
Replace code.forgejo.org/federation/debian Docker tag with data.forgejo.org/federation/debian trixie-cacerts (#1495)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1495
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-30 05:55:51 +00:00
Renovate Bot
35a7a26227
Replace code.forgejo.org/oci/redis Docker tag with data.forgejo.org/oci/redis 7.2 (#1498)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1498
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-30 05:55:37 +00:00
Renovate Bot
de9eafb574
Update https://data.forgejo.org/actions/setup-forgejo action to v3.1.4 (#1536)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1536
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-30 05:55:18 +00:00
Renovate Bot
d50ffce2a0 Update data.forgejo.org/oci/alpine Docker tag to v3.23 (#1518)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [data.forgejo.org/oci/alpine](https://hub.docker.com/_/alpine) ([source](https://github.com/alpinelinux/docker-alpine)) | container | minor | `3.21` → `3.23` |

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Mi40IiwidXBkYXRlZEluVmVyIjoiNDIuOTIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1518
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-27 03:04:58 +00:00
Renovate Bot
5cbe4d73dd Replace alpine packages with data.forgejo.org/oci/alpine latest (#1490)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| code.forgejo.org/oci/alpine → data.forgejo.org/oci/alpine | container | replacement | `latest` → `latest` |
| [code.forgejo.org/oci/alpine](https://hub.docker.com/_/alpine) ([source](https://github.com/alpinelinux/docker-alpine)) → [data.forgejo.org/oci/alpine](https://hub.docker.com/_/alpine) | container | replacement | `3.21` → `3.21` |
| code.forgejo.org/oci/alpine → data.forgejo.org/oci/alpine |  | replacement | `latest` → `latest` |

This is a special PR that replaces `code.forgejo.org/oci/alpine` with the community suggested minimal stable replacement version.

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44NS4zIiwidXBkYXRlZEluVmVyIjoiNDIuODUuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1490
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-26 21:46:01 +00:00
Renovate Bot
ed965a3179 Replace code.forgejo.org/oci/debian Docker tag with data.forgejo.org/oci/debian trixie (#1493)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| code.forgejo.org/oci/debian → data.forgejo.org/oci/debian | container | replacement | `trixie` → `trixie` |
| code.forgejo.org/oci/debian → data.forgejo.org/oci/debian | service | replacement | `trixie` → `trixie` |

This is a special PR that replaces `code.forgejo.org/oci/debian` with the community suggested minimal stable replacement version.

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44NS4zIiwidXBkYXRlZEluVmVyIjoiNDIuODUuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1493
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-26 21:44:43 +00:00
Renovate Bot
cd91235a86 Replace code.forgejo.org/oci/docker Docker tag with data.forgejo.org/oci/docker (#1494)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [code.forgejo.org/oci/docker](https://hub.docker.com/_/docker) ([source](https://github.com/docker-library/docker)) → [data.forgejo.org/oci/docker](https://hub.docker.com/_/docker) | container | replacement | `28-cli` → `28-cli` |

This is a special PR that replaces `code.forgejo.org/oci/docker` with the community suggested minimal stable replacement version.

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44NS4zIiwidXBkYXRlZEluVmVyIjoiNDIuODUuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1494
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-26 21:44:02 +00:00
Renovate Bot
d4dfeef16a Replace code.forgejo.org/oci/postgres Docker tag with data.forgejo.org/oci/postgres (#1496)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [code.forgejo.org/oci/postgres](https://hub.docker.com/_/postgres) ([source](https://github.com/docker-library/postgres)) → [data.forgejo.org/oci/postgres](https://hub.docker.com/_/postgres) | service | replacement | `15` → `15` |
| [code.forgejo.org/oci/postgres](https://hub.docker.com/_/postgres) ([source](https://github.com/docker-library/postgres)) → [data.forgejo.org/oci/postgres](https://hub.docker.com/_/postgres) |  | replacement | `14` → `14` |

This is a special PR that replaces `code.forgejo.org/oci/postgres` with the community suggested minimal stable replacement version.

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44NS4zIiwidXBkYXRlZEluVmVyIjoiNDIuODUuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1496
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-26 21:43:39 +00:00
Renovate Bot
390c68f447 Replace code.forgejo.org/oci/python Docker tag with data.forgejo.org/oci/python slim (#1497)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| code.forgejo.org/oci/python → data.forgejo.org/oci/python | container | replacement | `slim` → `slim` |

This is a special PR that replaces `code.forgejo.org/oci/python` with the community suggested minimal stable replacement version.

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44NS4zIiwidXBkYXRlZEluVmVyIjoiNDIuODUuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1497
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-26 21:17:01 +00:00
Renovate Bot
736c1dd909 Update https://data.forgejo.org/actions/setup-forgejo action to v3.1.3 (#1515)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | patch | `v3.1.2` → `v3.1.3` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://data.forgejo.org/actions/setup-forgejo)</summary>

### [`v3.1.3`](https://code.forgejo.org/actions/setup-forgejo/releases/tag/v3.1.3)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v3.1.2...v3.1.3)

<!--start release-notes-assistant-->

<!--URL:https://code.forgejo.org/actions/setup-forgejo-->

- other
  - [PR](https://code.forgejo.org/actions/setup-forgejo/pulls/860): <!--number 860 --><!--line 0 --><!--description VXBkYXRlIGRlcGVuZGVuY3kgZm9yZ2Vqby9ydW5uZXIgdG8gdjEyLjYuMg==-->Update dependency forgejo/runner to v12.6.2<!--description-->

<!--end release-notes-assistant-->

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Mi40IiwidXBkYXRlZEluVmVyIjoiNDIuOTIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1515
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-26 04:02:25 +00:00
Renovate Bot
6821a5adb5 Update https://data.forgejo.org/actions/setup-forgejo action to v3.1.2 (#1505)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | patch | `v3.1.1` → `v3.1.2` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://data.forgejo.org/actions/setup-forgejo)</summary>

### [`v3.1.2`](https://code.forgejo.org/actions/setup-forgejo/releases/tag/v3.1.2)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v3.1.1...v3.1.2)

<!--start release-notes-assistant-->

<!--URL:https://code.forgejo.org/actions/setup-forgejo-->

- other
  - [PR](https://code.forgejo.org/actions/setup-forgejo/pulls/852): <!--number 852 --><!--line 0 --><!--description VXBkYXRlIGRlcGVuZGVuY3kgZm9yZ2Vqby9ydW5uZXIgdG8gdjEyLjYuMQ==-->Update dependency forgejo/runner to v12.6.1<!--description-->
  - [PR](https://code.forgejo.org/actions/setup-forgejo/pulls/846): <!--number 846 --><!--line 0 --><!--description VXBkYXRlIGRlcGVuZGVuY3kgZm9yZ2Vqby9ydW5uZXIgdG8gdjEyLjYuMA==-->Update dependency forgejo/runner to v12.6.0<!--description-->

<!--end release-notes-assistant-->

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44NS4zIiwidXBkYXRlZEluVmVyIjoiNDIuODUuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1505
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-24 02:43:17 +00:00
Renovate Bot
47a8f5147b
Replace code.forgejo.org/federation/mastodon Docker tag with data.forgejo.org/federation/mastodon v4.5-test (#1489)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1489
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-23 09:08:34 +00:00
Mario Minardi
b3299acd69 feat: add OIDC workload identity federation tests (#1364)
Add end-to-end tests for workload identity federation.

Depends on https://code.forgejo.org/forgejo/runner/pulls/1232
Depends on https://codeberg.org/forgejo/forgejo/pulls/10481

Signed-off-by: Mario Minardi <mminardi@shaw.ca>

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1364
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Mario Minardi <mminardi@shaw.ca>
Co-committed-by: Mario Minardi <mminardi@shaw.ca>
2026-01-22 15:22:22 +00:00
famfo
e05f0b5bf8
fix(federation): downgrade GoToSocial (#1448)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1448
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
2026-01-19 08:45:35 +00:00
Andreas Ahlenstorf
372409f76b test: test offline runner registration (#1449)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1449
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
Co-committed-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
2026-01-19 01:47:27 +00:00
Andreas Ahlenstorf
25c472b90b test: test cloning of private reusable workflows (#1436)
Verify that Forgejo Runner can access a reusable workflow that is stored in a private repository.

That should help prevent https://code.forgejo.org/forgejo/runner/issues/1274 from happening again.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1436
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
Co-committed-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
2026-01-18 20:15:11 +00:00
Renovate Bot
03ee700046
Update https://data.forgejo.org/actions/setup-forgejo action to v3.1.1 (#1465)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1465
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-18 15:20:42 +00:00
Renovate Bot
0ddc6beceb Update https://data.forgejo.org/actions/setup-forgejo action to v3.1.0 (#1402)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | minor | `v3.0.7` → `v3.1.0` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://data.forgejo.org/actions/setup-forgejo)</summary>

### [`v3.1.0`](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.7...v3.1.0)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.7...v3.1.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43MS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1402
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-10 15:21:40 +00:00
famfo
45417622c0 feat(federation): add scenario-gotosocial setup and teardown (#1275)
3/5 taken out of #1269

This patch adds the setup and teardown of GoToSocial for use in the end-to-end tests

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1275
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
2026-01-05 17:36:57 +00:00
famfo
a57c631fae feat(federation): add scenario-mastodon setup and teardown (#1274)
2/5 taken out of #1269

This patch adds the setup and teardown of Mastodon for use in the end-to-end tests

Co-Authored-By: zam <mirco.zachmann@meissa.de>
Co-Authored-By: erik <erik.seiert@meissa-gmbh.de>
Co-Authored-By: Michael Jerger <michael.jerger@meissa-gmbh.de>

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1274
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Reviewed-by: Beowulf <beowulf@noreply.code.forgejo.org>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
2026-01-05 14:34:58 +00:00
Mathieu Fenniak
1064337c89 ci: run Forgejo Actions & Packages test w/ dynamic matrix (#1367)
Incorporates these changes:
- When `forgejo/build-from-sources` is present, Actions & Packages tests are run only against the built versions.  Otherwise, they are run against the versions defined in `$RELEASE_NUMBERS`
- Updates Packages tests which are testing Alpine publishing to use currently supported Alpine releases
- Actions & Packages tests are run in a matrix, allowing parallel execution

Only the Actions & Packages tests take a significant amount of time (>10 minutes), so changes have been limited to those test suites -- every test suite that is moved into a matrix adds additional overhead in the 1 minute `prepare-end-to-end` step.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1367
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2026-01-01 22:16:33 +00:00
Mathieu Fenniak
6e89c972c3 test: add reusable workflow expansion test for ${{ needs... }} (#1362)
end-to-end tests for https://codeberg.org/forgejo/forgejo/pulls/10647

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1362
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2026-01-01 18:17:58 +00:00
Mathieu Fenniak
0e0b1429e6 test: add reusable workflow expansion test for secrets (#1351)
Local test:
![image](/attachments/2357b06f-2506-4a31-ae51-a372e4eb4704)

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1351
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-12-30 20:16:02 +00:00
Mathieu Fenniak
1fbbc4277c test: add reusable workflow expansion test for inputs (#1323)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1323
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-12-30 14:49:39 +00:00
Mathieu Fenniak
cc2a2e85f7 test: add reusable workflow expansion test for outputs (#1322)
In the "reusable workflow expansion" case (that is, when `runs-on` is not provided), this PR adds tests for `on.workflow_call.outputs`, and expands the test case to have two layers of reusable workflows to cover quirky behaviours that were discovered during manual testing.

Manual invocation successful:
![image](/attachments/0406a783-4ef6-4854-a376-421ccc86b854)

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1322
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-12-29 02:58:01 +00:00
Mathieu Fenniak
a8a26c9296 test: add reusable workflow expansion test (#1316)
end-to-end test covering https://codeberg.org/forgejo/forgejo/pulls/10525.

![image](/attachments/2bca39ea-67d9-4ae6-a940-e2b5f77b11d4)

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1316
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-12-28 16:29:05 +00:00
Renovate Bot
37fdd131e2
Update https://data.forgejo.org/actions/setup-forgejo action to v3.0.7 (#1343)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1343
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-12-28 14:42:32 +00:00
0ko
1ff059023a
chore(release): v15.0 exists (#1310)
Like https://code.forgejo.org/forgejo/end-to-end/pulls/710 and https://code.forgejo.org/forgejo/end-to-end/pulls/1057 (+ https://code.forgejo.org/forgejo/end-to-end/pulls/1058/files)

End-to-end for latest nonLTS is usually retired earlier than EoL to save power per https://code.forgejo.org/forgejo/end-to-end/pulls/1058#issuecomment-61424.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1310
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-12-21 16:53:06 +00:00
Renovate Bot
c1cfa1f39c Replace Node.js with data.forgejo.org/oci/node (#1278)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [code.forgejo.org/oci/node](https://hub.docker.com/_/node) ([source](https://github.com/nodejs/docker-node)) → [data.forgejo.org/oci/node](https://hub.docker.com/_/node) | final | replacement | `22-trixie` -> `22-trixie` |

This is a special PR that replaces `code.forgejo.org/oci/node` with the community suggested minimal stable replacement version.

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4yNy4wIiwidXBkYXRlZEluVmVyIjoiNDIuMjcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1278
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-12-05 15:38:42 +00:00
famfo
8f910d71da
mastodon/gotosocial e2e tests: documentation changes (#1277)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1277
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
2025-12-05 10:42:14 +00:00
famfo
891e8f2d81
mastodon/gotosocial e2e tests: infrastructure changes (#1273)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1273
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
2025-12-05 10:40:47 +00:00
Mathieu Fenniak
4622f0fe78 test: add Actions dynamic matrix end-to-end test (#1261)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1261
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>
2025-12-01 18:59:50 +00:00
Renovate Bot
ec2d8e96b7 Replace Node.js with data.forgejo.org/oci/node (#1239)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [code.forgejo.org/oci/node](https://hub.docker.com/_/node) ([source](https://github.com/nodejs/docker-node)) → [data.forgejo.org/oci/node](https://hub.docker.com/_/node) | container | replacement | `22-bookworm` -> `22-bookworm` |
| [code.forgejo.org/oci/node](https://hub.docker.com/_/node) ([source](https://github.com/nodejs/docker-node)) → [data.forgejo.org/oci/node](https://hub.docker.com/_/node) | container | replacement | `20-bookworm` -> `20-bookworm` |
| [code.forgejo.org/oci/node](https://hub.docker.com/_/node) ([source](https://github.com/nodejs/docker-node)) → [data.forgejo.org/oci/node](https://hub.docker.com/_/node) | final | replacement | `20-bookworm` -> `20-bookworm` |

This is a special PR that replaces `code.forgejo.org/oci/node` with the community suggested minimal stable replacement version.

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xMS4wIiwidXBkYXRlZEluVmVyIjoiNDIuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1239
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-12-01 15:41:41 +00:00
Earl Warren
74b8bebbe8 actions: parallel LXC jobs (#1149)
This is not guaranteed to fail if parallel jobs is broken, but it is likely to. That could create transient errors detecting race conditions similar to https://code.forgejo.org/forgejo/lxc-helpers/issues/50.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1149
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-12-01 15:25:21 +00:00
Earl Warren
069ca6777e
actions: cache-pull-request: pull request and cache isolation (#1062)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1062
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-12-01 14:00:07 +00:00
Earl Warren
14d2748a33
actions: use the forgejo context instead of forge and test backward compatibility (#1034)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1034
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-12-01 13:59:46 +00:00
Renovate Bot
7f6f69c80f
Update https://data.forgejo.org/actions/setup-forgejo action to v3.0.6 (#1233)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1233
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-11-19 06:00:58 +00:00
Renovate Bot
2cbea248e5
Update dependency forgejo-lxc to v13 (#1205)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1205
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-11-11 23:35:20 +00:00
viceice
45620f4065
fix: pin docker cli to v28 (#1203)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1203
Co-authored-by: viceice <michael.kriese@gmx.de>
Co-committed-by: viceice <michael.kriese@gmx.de>
2025-11-11 21:19:33 +00:00
Renovate Bot
d2234875f0 Update https://data.forgejo.org/actions/setup-forgejo action to v3.0.5 (#1192)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | patch | `v3.0.4` -> `v3.0.5` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://data.forgejo.org/actions/setup-forgejo)</summary>

### [`v3.0.5`](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.4...v3.0.5)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.4...v3.0.5)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNjkuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE2OS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1192
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-11-09 01:01:31 +00:00
Renovate Bot
22004ebe73
Update code.forgejo.org/oci/debian Docker tag to v13 (#1070)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| code.forgejo.org/oci/debian | container | major | `bookworm` -> `trixie` |
| code.forgejo.org/oci/debian | service | major | `bookworm` -> `trixie` |

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMjIuMyIsInVwZGF0ZWRJblZlciI6IjQxLjEyMi4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1070
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-10-18 06:11:46 +00:00
Earl Warren
2c247b8d49
feat: federation: upgrade to trixie (#1069)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1069
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-09-28 14:46:16 +00:00
0ko
ca5f4d096b
chore(release): v12.0 is EoL (#1058)
Ref https://code.forgejo.org/forgejo/end-to-end/pulls/1057

It will also need a rebase later.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1058
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-09-26 14:15:12 +00:00
0ko
8cfc202cb4
chore(release): v14.0 exists (#1057)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1057
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-09-25 15:06:50 +00:00
Renovate Bot
05e7b0c2f6
Update https://data.forgejo.org/actions/setup-forgejo action to v3.0.4 (#1046)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | patch | `v3.0.3` -> `v3.0.4` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://data.forgejo.org/actions/setup-forgejo)</summary>

### [`v3.0.4`](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.3...v3.0.4)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.3...v3.0.4)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMTMuMyIsInVwZGF0ZWRJblZlciI6IjQxLjExMy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1046
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-09-20 07:02:18 +00:00
Earl Warren
d3aab3b429
chore: actions: set the log level of the runner to trace (#1031)
it greatly helps with debugging

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1031
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-09-14 16:19:58 +00:00
Renovate Bot
219059b732
Update https://data.forgejo.org/actions/setup-forgejo action to v3.0.3 (#1014)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | patch | `v3.0.2` -> `v3.0.3` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://data.forgejo.org/actions/setup-forgejo)</summary>

### [`v3.0.3`](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.2...v3.0.3)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.2...v3.0.3)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny45IiwidXBkYXRlZEluVmVyIjoiNDEuOTcuOSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1014
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-09-10 05:26:17 +00:00
Earl Warren
9b17f51199
chore: do not propagate contexts to the documentation (#1010)
Refs forgejo/docs#1445

Notes: secrets should also be removed after this is merged

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1010
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-09-08 20:14:08 +00:00
Earl Warren
a3a5e22c6d
fix: actions: forgejo/test-setup-forgejo-docker is on code.forgejo.org (#1006)
It was working before today because of a routing bug in the Forgejo infrastructure

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1006
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-09-07 21:55:46 +00:00
Earl Warren
d29439c5f7
fix: actions: refactor force-rebuild tests to use a remote action (#991)
The local actions are always rebuilt with a random tag and cannot be used to verify the force_rebuild setting is working.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/991
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-09-01 17:14:24 +00:00
Earl Warren
ecff9c4c70
actions: context: verify RUNNER_TOOL_CACHE exists (#968)
As of [Forgejo runner 5.0.1](5889426664), RUNNER_TOOL_CACHE is set but it is not pre-populated. By default it does not exist but a dedicated container image my place shared tools at that location for actions / workflows that expect them to be advertised by this environment variable.

Resolves forgejo/runner#901

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/968
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-29 13:51:34 +00:00
Gusted
8f920b4b7a
Add coverage (#914)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/914
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-08-21 04:54:52 +00:00
Earl Warren
fea037d403
actions: context: verify RUN_ID (#951)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/951
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-17 17:50:19 +00:00
Earl Warren
95453f8fd8
fix: use yes/no instead of true/false for using a binary built from source (#948)
and add information from steps and inputs context for future debug.

---

For debugging a temporary commit [that trims the tests is used](https://code.forgejo.org/forgejo/end-to-end/pulls/948/commits/5e6bd041158847de99908464d629cbd85d14b951)

## No build from source

- https://code.forgejo.org/forgejo/end-to-end/actions/runs/3905
   ![image](/attachments/66ef5aa0-25a8-4624-9d92-dd18dce0a427)

## Build from source

A temporary commit [is used to build from sources](https://code.forgejo.org/forgejo/end-to-end/pulls/948/commits/ffa5170ba21c070208c7934d727327efc0ec248f).

- https://code.forgejo.org/forgejo/end-to-end/actions/runs/3904
  ![image](/attachments/e335ee9f-fa07-43e0-aaf4-dfa745aa2a6a)

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/948
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-17 08:44:56 +00:00
Earl Warren
1e33063227 fix: the build step output is built, not value (#947)
44f2cf9cf1/.forgejo/workflows/end-to-end.yml (L65)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/947
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-16 21:43:35 +00:00
Earl Warren
44f2cf9cf1
actions: show how secrets & outputs work with workflow_call (#934)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/934
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-16 20:47:03 +00:00
Earl Warren
6455896fd3
chore: do not needlessly upload an artifact when there is no build (#916)
- ${{ needs.build.outputs.built }} is true if there is a build from source, false otherwise
- prepare-end-to-end local action does not attempt to download an artifact if inputs.built  is false

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/916
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-15 07:34:38 +00:00
Renovate Bot
761ff8aa08
Update https://data.forgejo.org/actions/setup-forgejo action to v3.0.2 (#931)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | patch | `v3.0.1` -> `v3.0.2` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://data.forgejo.org/actions/setup-forgejo)</summary>

### [`v3.0.2`](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.1...v3.0.2)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.1...v3.0.2)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS42MS4wIiwidXBkYXRlZEluVmVyIjoiNDEuNjEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/931
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-08-15 07:34:13 +00:00
Earl Warren
20f170d4a0
actions: add trivial needs output example (#915)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/915
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-12 10:37:15 +00:00
Earl Warren
15cfe2f55c
actions: add trivial matrix example (#912)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/912
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-12 07:48:14 +00:00
Earl Warren
47f50d3257
actions: add test for reusable workflows (#839)
It is working although undocumented. It appears that Forgejo Actions users depend on it and breaking it would meet some non negligible push back. This test ensures that future Forgejo runner versions do not break what is working. This came to light because some fixes are necessary to the schema validation to allow for that to keep working (see https://code.forgejo.org/forgejo/act/pulls/194).

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/839
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-26 11:23:39 +00:00
Earl Warren
07654423c6
feat: enable Forgejo Actions email notifications (#707)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/707
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-23 15:23:20 +00:00
Earl Warren
841ca7c2c6
actions: as of Forgejo runner v8.0.0 FORGEJO_ACTION_PATH is hash based (#823)
Refs: https://code.forgejo.org/forgejo/act/pulls/186
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/823
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-21 20:31:52 +00:00
Earl Warren
18b2dc2e85
chore(cosmetic): pretty names for docs generation matrix (#816)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/816
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-20 18:50:38 +00:00
Renovate Bot
4e10e47689
Update https://data.forgejo.org/actions/cascading-pr action to v2.2.1 (#819)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/cascading-pr](https://code.forgejo.org/actions/cascading-pr) | action | minor | `v2.1.1` -> `v2.2.1` |

---

### Release Notes

<details>
<summary>actions/cascading-pr (https://data.forgejo.org/actions/cascading-pr)</summary>

### [`v2.2.1`](https://code.forgejo.org/actions/cascading-pr/compare/v2.2.0...v2.2.1)

[Compare Source](https://code.forgejo.org/actions/cascading-pr/compare/v2.2.0...v2.2.1)

### [`v2.2.0`](https://code.forgejo.org/actions/cascading-pr/compare/v2.1.1...v2.2.0)

[Compare Source](https://code.forgejo.org/actions/cascading-pr/compare/v2.1.1...v2.2.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4zMi4xIiwidXBkYXRlZEluVmVyIjoiNDEuMzIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/819
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-07-20 15:22:23 +00:00
Earl Warren
84b83250e3
chore(renovate): use cascading-pr@v2.1.1 instead of cascading-pr@v2.1 (#817)
because the branch is not maintained, only tags are used now

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/817
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-20 08:40:24 +00:00
Earl Warren
606c32a2be
fix: update the docs branches (#815)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/815
Reviewed-by: 0ko <0ko@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-20 04:25:19 +00:00
Earl Warren
0b826217a9
actions: shell: assert sh fallback (#790)
Refs forgejo/runner#150

Local testing [following instructions](https://code.forgejo.org/forgejo/end-to-end/src/branch/main/README.md#running-from-locally-built-binary) and [the matching ACT PR](https://code.forgejo.org/forgejo/act/pulls/177).

Once merged this will be a noop and actually remove coverage for shell test that was added earlier today. It will reactivate once the runner v8.0.0 is published.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/790
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-12 09:59:00 +00:00
Earl Warren
b2d99f4c4a
actions: shell: assert shell behavior (#788)
Refs https://code.forgejo.org/forgejo/runner/issues/150

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/788
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-12 08:08:25 +00:00
Earl Warren
b67f9e1a70
chore: s/GITHUB_*/FORGEJO_*/ & s/github./forge./ (#776)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/776
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-09 14:09:48 +00:00
Earl Warren
49c2072cbe
actions: use FORGEJO_* instead of GITHUB_* and test backward compatibility (#758)
Refs forgejo/act#171
Refs actions/setup-forgejo#461

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/758
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-08 04:51:37 +00:00
Renovate Bot
f0eadf960b
Update https://data.forgejo.org/actions/setup-forgejo action to v3.0.1 (#772)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | patch | `v3.0.0` -> `v3.0.1` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://data.forgejo.org/actions/setup-forgejo)</summary>

### [`v3.0.1`](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.0...v3.0.1)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.0...v3.0.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4yMy4yIiwidXBkYXRlZEluVmVyIjoiNDEuMjMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/772
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-07-07 19:35:28 +00:00
Renovate Bot
5988f7cde5
Update https://data.forgejo.org/actions/setup-forgejo action to v3 (#763)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | major | `v2.0.13` -> `v3.0.0` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://data.forgejo.org/actions/setup-forgejo)</summary>

### [`v3.0.0`](https://code.forgejo.org/actions/setup-forgejo/compare/v2.0.13...v3.0.0)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v2.0.13...v3.0.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4yMy4yIiwidXBkYXRlZEluVmVyIjoiNDEuMjMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/763
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-07-07 08:48:17 +00:00
Renovate Bot
0965ce216b
Update https://data.forgejo.org/actions/setup-forgejo action to v2.0.13 (#759)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | patch | `v2.0.12` -> `v2.0.13` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://data.forgejo.org/actions/setup-forgejo)</summary>

### [`v2.0.13`](https://code.forgejo.org/actions/setup-forgejo/compare/v2.0.12...v2.0.13)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v2.0.12...v2.0.13)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNy4yIiwidXBkYXRlZEluVmVyIjoiNDEuMTcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/759
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-07-07 05:10:47 +00:00
Earl Warren
cd1a0f5076
chore: add assertions for the forge context and use it instead of github where relevant (#748)
Refs forgejo/act#37

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/748
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-06 12:15:38 +00:00
Earl Warren
07b9318ff7
actions: config-options: mount read-only (#718)
To illustrate (partially) [this feature request](https://code.forgejo.org/forgejo/runner/issues/79#issuecomment-43844)

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/718
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-02 10:54:26 +00:00
Earl Warren
dd31a59c1e
actions: config-options: test for envs and env-file (#722)
Refs: forgejo/runner#287
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/722
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-02 10:53:36 +00:00
earl-warren
5b31c12efe
Merge pull request 'Update https://data.forgejo.org/actions/setup-forgejo action to v2.0.12' (#720) from renovate/https-data.forgejo.org-actions-setup-forgejo-2.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/720
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-07-02 05:15:46 +00:00
Renovate Bot
3bd75af38c
Update https://data.forgejo.org/actions/setup-forgejo action to v2.0.12 2025-07-02 00:01:02 +00:00
earl-warren
4ee6b65584
Merge pull request 'actions: add test for hashFiles()' (#714) from earl-warren/end-to-end:wip-hashfile into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/714
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-06-30 20:29:55 +00:00
Earl Warren
3d5a218709
actions: add test for hashFiles()
As of

7c7d80ebdd

a step with hashFiles('...') will lookup the file from the container
running the job.
2025-06-30 18:34:00 +02:00
earl-warren
d057711afa
Merge pull request 'chore(release): v13.0 exists' (#710) from earl-warren/end-to-end:wip-v12 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/710
2025-06-25 07:39:47 +00:00
Earl Warren
f8f9a1bbda
chore(release): v13.0 exists 2025-06-25 07:39:14 +02:00
earl-warren
1b9f1af7eb
Merge pull request 'Update data.forgejo.org/oci/pyroscope Docker tag to v1.12.1' (#616) from renovate/data.forgejo.org-oci-pyroscope-1.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/616
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-06-21 05:06:06 +00:00
earl-warren
24f0210137
Merge pull request 'fix: federation: federation_verify_scenario is missing variables' (#679) from earl-warren/end-to-end:wip-federation-test into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/679
2025-06-09 06:48:04 +00:00
earl-warren
6bfc638f15
Merge pull request 'chore(docs): update instructions to compile from source' (#678) from earl-warren/end-to-end:wip-local-run into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/678
2025-06-09 06:47:40 +00:00
Earl Warren
475545eddf
fix: federation: federation_verify_scenario is missing variables 2025-06-07 15:30:36 +01:00
Earl Warren
482065391d
chore(docs): update instructions to compile from source
The frontend part was missing, make it easy to copy/paste.
2025-06-07 14:56:08 +01:00
earl-warren
aab476b719
Merge pull request 'update logger mode in forgejo configs' (#677) from famfo/end-to-end:logger into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/677
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-06-07 11:20:40 +00:00
earl-warren
f8e06e4af8
Merge pull request 'Add Dockerfile to run tests in' (#676) from famfo/end-to-end:podman into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/676
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-06-07 11:19:51 +00:00
famfo
652cf00186
update logger mode in forgejo configs 2025-06-07 12:36:27 +02:00
famfo
5a586aedfa
README: add notes on Dockerfile usage 2025-06-07 12:32:28 +02:00
famfo
9c355c30c1
add Dockerfile to run tests in 2025-06-07 12:26:56 +02:00
Michael Kriese
796a32d6c1
Merge pull request 'chore(revert): fix: alternative route of getting latest Gitea version' (#636) from limiting-factor/end-to-end:wip-gitea into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/636
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-05-09 11:08:48 +00:00
limiting-factor
5b5dab8c13
chore(revert): fix: alternative route of getting latest Gitea version
Revert 53375283d4
fix: alternative route of getting latest Gitea version

Use git ls-remote and git-mirror instead of the API

$ version=1.23
$ git ls-remote --refs --tags --sort=version:refname https://git-mirror.forgejo.org/go-gitea/gitea "v$version*" | sed -n -E -e "s|^.*/v($version[\.0-9]*)$|\1|p"
1.23.0
1.23.1
1.23.2
1.23.3
1.23.4
1.23.5
1.23.6
1.23.7
2025-05-09 12:37:04 +02:00
Renovate Bot
f902566558
Update data.forgejo.org/oci/pyroscope Docker tag to v1.12.1 2025-04-12 00:01:01 +00:00
earl-warren
5a339800d3
Merge pull request 'fix: upgrades: teach renovate about the pyroscope version' (#613) from earl-warren/end-to-end:wip-versions into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/613
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-04-11 07:03:32 +00:00
Earl Warren
efc1a9f21b
fix: upgrades: teach renovate about the pyroscope version 2025-04-11 08:55:25 +02:00
earl-warren
66c6a0f456
Merge pull request 'fix: upgrades: do not hardcode versions' (#612) from earl-warren/end-to-end:wip-versions into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/612
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-04-11 06:48:12 +00:00
Earl Warren
f537340c93
fix: upgrades: do not hardcode versions
- upgrading v7.0 to v7.0 is a noop
- pprof testing lags behind
2025-04-11 08:08:38 +02:00
earl-warren
2cfd335303
Merge pull request 'chore(release): v12.0 needs testing' (#608) from earl-warren/end-to-end:wip-12 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/608
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-04-10 09:14:59 +00:00
Earl Warren
d68ee49e3b
chore(release): v12.0 needs testing 2025-04-10 10:44:11 +02:00
earl-warren
c1951e2157
Merge pull request 'chore(release): v12.0 exists' (#606) from earl-warren/end-to-end:wip-12 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/606
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-04-10 08:13:59 +00:00
Earl Warren
63a09dbaaa
chore(release): v12.0 exists 2025-04-10 10:07:42 +02:00
earl-warren
14eb834334
Merge pull request 'actions: set insecure: true for better coverage' (#605) from earl-warren/end-to-end:wip-insecure into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/605
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-04-06 09:40:51 +00:00
Earl Warren
2819929687
actions: set insecure: true for better coverage
Refs: https://code.forgejo.org/forgejo/runner/pulls/535
2025-04-06 10:50:03 +02:00
earl-warren
21db5f24ba
Merge pull request 'actions: cache: use separate jobs for restore and save' (#592) from earl-warren/end-to-end:wip-cache into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/592
2025-03-30 08:27:51 +00:00
Earl Warren
e63a861f43
actions: cache: use separate jobs for restore and save 2025-03-26 15:35:59 +00:00
earl-warren
72b1e754a5
Merge pull request 'Update https://data.forgejo.org/actions/setup-forgejo action to v2.0.11' (#588) from renovate/https-data.forgejo.org-actions-setup-forgejo-2.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/588
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-03-25 07:30:12 +00:00
Renovate Bot
d258431824
Update https://data.forgejo.org/actions/setup-forgejo action to v2.0.11 2025-03-25 01:31:29 +00:00
earl-warren
f8e6d9a2ef
Merge pull request 'chore: s/code.forgejo.org/data.forgejo.org/ for actions' (#570) from earl-warren/end-to-end:wip-data into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/570
2025-03-22 15:59:51 +00:00
Earl Warren
b2471a699d
chore: s/code.forgejo.org/data.forgejo.org/ for actions 2025-03-22 16:07:29 +01:00
earl-warren
3cbec4448c
Merge pull request 'Update https://code.forgejo.org/actions/setup-forgejo action to v2.0.10' (#571) from renovate/https-code.forgejo.org-actions-setup-forgejo-2.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/571
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-03-22 14:58:31 +00:00
Renovate Bot
4f7251fdb6
Update https://code.forgejo.org/actions/setup-forgejo action to v2.0.10 2025-03-22 14:17:35 +00:00
Kwonunn
f3a9672647
add cache-proxy test (#557)
test to verify that a cache stored in one repo can't be restored in another

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/557
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Kwonunn <kwonunnx@gmail.com>
Co-committed-by: Kwonunn <kwonunnx@gmail.com>
2025-03-22 12:34:06 +00:00
earl-warren
4c1a4cbdac
Merge pull request 'fix: alternative route of getting latest Gitea version' (#564) from wip-gitea into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/564
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-03-22 09:45:24 +00:00
Earl Warren
53375283d4
fix: alternative route of getting latest Gitea version
Use a code.forgejo.org mirror instead of the GitHub API to not be
subject to rate limiting.
2025-03-22 09:43:42 +01:00
earl-warren
8464d5cdef
Merge pull request 'fix: alternative route of getting latest Gitea version' (#560) from gusted-patch-1 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/560
2025-03-21 22:41:35 +00:00
Gusted
dd0002c7c6 Update lib/lib.sh 2025-03-21 19:23:49 +00:00
Gusted
cd95e73756 fix: alternative route of getting latest Gitea version
https://gitea.com/gitea/gitea-mirror no longer exists, instead use https://dl.gitea.com/gitea/version.json. Simplifies logic.
2025-03-21 19:02:26 +00:00
earl-warren
9d001beba8
Merge pull request 'fix: lib: use temporary unique file name' (#547) from limiting-factor/end-to-end:wip-version into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/547
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-02-23 13:33:17 +00:00
limiting-factor
e03278e4c1 fix: lib: use temporary unique file name
The function may be called from scripts that run under different users
and re-using the same file name will run into problems:

/home/debian/.cache/act/2cc577985400de79/hostexecutor/lib/lib.sh: line 96: /tmp/page: Permission denied
curl: (23) Failure writing output to destination
2025-02-23 13:58:45 +01:00
earl-warren
327386d195
Merge pull request 'Update https://code.forgejo.org/actions/setup-forgejo action to v2.0.9' (#546) from renovate/https-code.forgejo.org-actions-setup-forgejo-2.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/546
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-02-23 07:47:20 +00:00
Renovate Bot
13c723cb2c
Update https://code.forgejo.org/actions/setup-forgejo action to v2.0.9 2025-02-23 00:01:20 +00:00
limiting-factor
310322d01f
fix: lib: get all releases (#544)
Loop over all pages instead of getting the first one only to not miss any version.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/544
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: limiting-factor <limiting-factor@posteo.com>
Co-committed-by: limiting-factor <limiting-factor@posteo.com>
2025-02-22 16:26:24 +00:00
limiting-factor
6f6466b3f6
feat: ${FORGEJO_INSTANCE:=https://codeberg.org} (#542)
Do not hardcode https://codeberg.org, use the FORGEJO_INSTANCE variable instead. It can be overriden when codeberg.org is unavailable.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/542
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: limiting-factor <limiting-factor@posteo.com>
Co-committed-by: limiting-factor <limiting-factor@posteo.com>
2025-02-22 15:55:38 +00:00
earl-warren
25b2635022
Merge pull request 'fix: Heptapod is not longer available' (#541) from limiting-factor/end-to-end:wip-gitlab into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/541
2025-02-22 13:30:12 +00:00
limiting-factor
7abcd0e280 fix: Heptapod is not longer available
The default_vcs_type setting is Heptapod specific and cannot be used
for GitLab.

Refs: https://code.forgejo.org/f3/gof3/issues/88
2025-02-22 10:38:35 +01:00
earl-warren
9a477b3f40
Merge pull request 'fix: upgrade: add missing check for migration warnings and errors' (#496) from earl-warren/end-to-end:wip-upgrade into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/496
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
2025-02-19 10:54:40 +00:00
Earl Warren
c29e1e64e7
feat: actions: verify LXC backend can checkout (#522)
ACT is expected to provide an LXC backend with node pre-installed by default to allow for running commonly used actions written in JS.

It also includes an upgrade to setup-forgejo 2.0.8 which contains a fix to teardown the runner properly even in the event where it contains files owned by root. This happens when running a workflow within a LXC container.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/522
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-01-29 06:57:27 +00:00
earl-warren
5ac193f3d6
Merge pull request 'Update https://code.forgejo.org/actions/setup-forgejo action to v2.0.8' (#525) from renovate/https-code.forgejo.org-actions-setup-forgejo-2.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/525
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-01-29 06:26:16 +00:00
Renovate Bot
e181f9a72a
Update https://code.forgejo.org/actions/setup-forgejo action to v2.0.8 2025-01-29 00:02:01 +00:00
Earl Warren
429d5584e1
feat: actions: add LXC backend example (#520)
Without such an example, there is no test that would verify a modification of the ACT LXC backend is working when running a cascading pull request.

Trace of the run at: https://code.forgejo.org/forgejo/end-to-end/actions/runs/2433/jobs/2#jobstep-4-28

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/520
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-01-28 17:16:51 +00:00
earl-warren
16dba44733
Merge pull request 'chore(readme): explain how to use a locally built runner' (#514) from earl-warren/end-to-end:wip-local-runner into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/514
2025-01-28 16:57:12 +00:00
Earl Warren
e38cd362d9
chore(readme): explain how to use a locally built runner 2025-01-28 11:21:17 +01:00
earl-warren
6717b76117
Merge pull request 'feat: actions: verify that container.options --hostname is valid' (#505) from earl-warren/end-to-end:wip-options-hostname into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/505
2025-01-22 23:13:07 +00:00
Renovate Bot
a3388d98dc
Update https://code.forgejo.org/actions/setup-forgejo action to v2.0.7 (#509)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://code.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | patch | `v2.0.6` -> `v2.0.7` |

---

### Release Notes

<details>
<summary>actions/setup-forgejo (https://code.forgejo.org/actions/setup-forgejo)</summary>

### [`v2.0.7`](https://code.forgejo.org/actions/setup-forgejo/compare/v2.0.6...v2.0.7)

[Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v2.0.6...v2.0.7)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMTcuMiIsInVwZGF0ZWRJblZlciI6IjM5LjExNy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/509
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-01-22 23:09:03 +00:00
Renovate Bot
3275d464e5
Update https://code.forgejo.org/actions/setup-forgejo action to v2.0.7 2025-01-22 23:45:00 +01:00
Earl Warren
ff2c6790b3
feat: actions: verify that container.options --hostname is valid
Refs: https://code.forgejo.org/forgejo/act/pulls/95
2025-01-22 18:46:02 +01:00
Earl Warren
f8d5ecb47b
fix: upgrade: add missing check for migration warnings and errors
Refs: https://codeberg.org/forgejo/forgejo/issues/6583
2025-01-18 11:04:11 +01:00
earl-warren
925c936032 Merge pull request 'fix: catch warnings and errors' (#493) from earl-warren/end-to-end:wip-upgrades into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/493
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-16 20:48:36 +00:00
Earl Warren
5f9ea45844
fix: catch warnings and errors 2025-01-16 19:27:44 +01:00
earl-warren
ba6c49b79b Merge pull request 'feat: v9.0 is EOL and v11.0 needs testing' (#492) from earl-warren/end-to-end:wip-upgrades into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/492
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-16 09:53:04 +00:00
Earl Warren
80b6d688d0
feat: v9.0 is EOL and v11.0 needs testing 2025-01-16 09:43:45 +01:00
earl-warren
46bfc4e4d7 Merge pull request 'Update actions/setup-forgejo action to v2.0.6' (#489) from renovate/actions-setup-forgejo-2.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/489
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-01-16 06:26:29 +00:00
Renovate Bot
faaa390f15
Update actions/setup-forgejo action to v2.0.6 2025-01-16 00:01:54 +00:00
earl-warren
46ca949012 Merge pull request 'fix: upgrade must use code.forgejo.org/oci' (#483) from earl-warren/end-to-end:wip-upgrades into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/483
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-15 12:43:00 +00:00
Earl Warren
5c2eebc521
fix: upgrade must use code.forgejo.org/oci
Otherwise it may get rate limited in the CI verifying it works
2025-01-15 13:18:50 +01:00
earl-warren
37572630e8 Merge pull request 'feat: use alpine 3.21 and forgejo 10.0' (#478) from earl-warren/end-to-end:wip-packages into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/478
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-13 06:28:56 +00:00
earl-warren
fca9278771 Merge pull request 'fix: use code.forgejo.org instead of docker.io' (#477) from earl-warren/end-to-end:wip-docker into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/477
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-13 06:28:44 +00:00
Earl Warren
135bd00a26
feat: use alpine 3.21 and forgejo 10.0
and no longer alpine 3.19 and forgejo 9.0
2025-01-13 06:05:00 +01:00
Earl Warren
beae8629a6
fix: use code.forgejo.org instead of docker.io
to avoid throttling

Fixes: https://code.forgejo.org/forgejo/end-to-end/actions/runs/2316
2025-01-13 05:30:48 +01:00
earl-warren
eebf6a1062 Merge pull request 'actions: force-rebuild must use a copy of the repository' (#474) from earl-warren/end-to-end:wip-force-rebuild into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/474
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-12 07:46:53 +00:00
Earl Warren
adb09f901b
actions: force-rebuild use code.forgejo.org/oci to avoid throttling 2025-01-12 08:21:50 +01:00
Earl Warren
65e3fafd02
actions: force-rebuild must use a copy of the repository
it may not have permission to write on the repository itself, nor
should it.
2025-01-12 08:06:46 +01:00
earl-warren
3d53d7f99e Merge pull request 'Update actions/setup-forgejo action to v2.0.5' (#471) from renovate/actions-setup-forgejo-2.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/471
2025-01-11 18:40:11 +00:00
earl-warren
ae389fc5a2 Merge pull request 'chore(cleanup): log compression test does not belong' (#470) from earl-warren/end-to-end:wip-compress into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/470
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-11 18:21:26 +00:00
Renovate Bot
734eb7de64
Update actions/setup-forgejo action to v2.0.5 2025-01-11 18:18:13 +00:00
Earl Warren
dacb3b0fac
chore(cleanup): log compression test does not belong
It is a feature and best tested in Forgejo itself, not in
end-to-end. It is a recurring source of false negative and there is
little to no value is fixing the associated border case because it
only applies to short lived Forgejo instances used during tests.

Fixes: https://code.forgejo.org/forgejo/end-to-end/issues/431
2025-01-11 18:07:48 +01:00
gratux
dbe50bffc7 add test for force_rebuild (#448)
see also [forgejo/runner #406](https://code.forgejo.org/forgejo/runner/pulls/406)

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/448
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: gratux <gratux@noreply.code.forgejo.org>
Co-committed-by: gratux <gratux@noreply.code.forgejo.org>
2025-01-11 15:27:44 +00:00
earl-warren
5e0b4c6419 Merge pull request 'actions: verify runner config options for the container' (#463) from earl-warren/end-to-end:wip-config-options into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/463
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-11 09:58:23 +00:00
Earl Warren
f6f0acae0e
actions: verify runner config options for the container
- is not restricted to --volume (can use --env, etc.)
- --volume is sanitized with valid_volumes
2025-01-11 09:02:39 +01:00
earl-warren
d9edb00c72 Merge pull request 'chore(release): cut branch v11.0' (#437) from earl-warren/end-to-end:wip-10.0 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/437
2025-01-01 08:44:56 +00:00
Earl Warren
3bfb74d358
chore(release): cut branch v11.0 2025-01-01 08:44:00 +00:00
earl-warren
f2214d547f Merge pull request 'fix: actions: verify the docker_host socket works' (#399) from earl-warren/end-to-end:wip-docker-host into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/399
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-31 19:41:34 +00:00
earl-warren
421cdcb03c Merge pull request 'upgrade: verify that Forgejo upgrades show no migration warnings' (#446) from earl-warren/end-to-end:wip-10.0-migration into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/446
2024-12-30 21:01:51 +00:00
Earl Warren
346b44a198
upgrade: verify that Forgejo upgrades show no migration warnings
Refs: https://codeberg.org/forgejo/forgejo/issues/6389
2024-12-29 16:14:07 +00:00
earl-warren
3de2a36f6c Merge pull request 'feat: verify migration warnings when upgrading from Gitea' (#430) from earl-warren/end-to-end:wip-migration into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/430
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-24 11:25:03 +00:00
earl-warren
c9e68961b1 Merge pull request 'Revert "feat: test FORGEJO_TOKEN"' (#435) from earl-warren/end-to-end:wip-branding into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/435
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-24 09:31:51 +00:00
Earl Warren
186b29a8a0
Revert "feat: test FORGEJO_TOKEN"
This reverts commit af5923c7d4.
2024-12-24 09:56:36 +01:00
Earl Warren
33d36a0e99
feat: verify migration warnings when upgrading from Gitea 2024-12-22 12:48:09 +01:00
earl-warren
32779c4d6d Merge pull request 'feat: test FORGEJO_TOKEN' (#416) from xtex/forgejo-end-to-end:forgejo-token into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/416
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-12-20 20:27:42 +00:00
xtex
af5923c7d4
feat: test FORGEJO_TOKEN 2024-12-20 17:38:55 +08:00
Earl Warren
d142c4a60d
fix: actions: verify the docker_host socket works
It could be mounted but not functional.
2024-12-08 16:18:15 +01:00
earl-warren
3450de64aa Merge pull request 'Update actions/setup-forgejo action to v2.0.4' (#396) from renovate/actions-setup-forgejo-2.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/396
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-12-08 07:43:48 +00:00
Renovate Bot
0a782ec58f
Update actions/setup-forgejo action to v2.0.4 2024-12-08 00:01:21 +00:00
Michael Kriese
ec8c704034 Merge pull request 'fix: do not use api.github.com to avoid being rate limited' (#381) from earl-warren/end-to-end:wip-github into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/381
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-04 13:28:30 +00:00
Earl Warren
6ce90814b2
fix: do not use api.github.com to avoid being rate limited 2024-12-04 14:11:17 +01:00
earl-warren
b12130646b Merge pull request 'Update actions/setup-forgejo action to v2.0.3' (#372) from renovate/actions-setup-forgejo-2.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/372
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-11-27 12:26:33 +00:00
Renovate Bot
bc7eb2f245
Update actions/setup-forgejo action to v2.0.3 2024-11-27 12:01:13 +00:00
Earl Warren
77e6412295
fix(actions): documentation update matrix needs prepare_dockerd
It runs all actions tests to collect artefacts relevant to the
documentation and has the same dependencies as running the actions
tests in a pull request.
2024-11-27 10:26:17 +00:00
earl-warren
acb860ef24 Merge pull request 'actions: runner [container].docker_host variations' (#370) from earl-warren/end-to-end:wip-actions-docker into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/370
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-27 09:55:35 +00:00
Earl Warren
33749f5a5e
actions: runner [container].docker_host variations
* automount
* "" or "-"
* unix:///var/run/docker.sock
* tcp://127.0.0.1:2375
2024-11-27 09:33:08 +00:00
earl-warren
801c760a4e Merge pull request 'Update actions/setup-go action to v5' (#365) from renovate/actions-setup-go-5.x into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/365
2024-11-21 13:31:03 +00:00
Renovate Bot
4f84eefa62
Update actions/setup-go action to v5 2024-11-21 13:01:22 +00:00
Michael Kriese
0cbcd6763f Merge pull request 'Configure Renovate' (#360) from renovate/configure into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/360
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-11-21 07:37:23 +00:00
Renovate Bot
48f422b903
Add renovate.json 2024-11-21 07:32:07 +00:00
earl-warren
40906683a3 Merge pull request 'actions: fix: wait for the action logs to show up' (#337) from earl-warren/end-to-end:wip-compression into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/337
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-13 17:08:12 +00:00
Earl Warren
c4b3c61325
actions: fix: wait for the action logs to show up
The Forgejo instance completed the echo test successfully, there must
be a log at some point. But since Forgejo is still running, it may not
had time to write the logs just yet. Retry instead of giving up
immediately.
2024-11-12 15:40:12 +01:00
earl-warren
60e90f5bc0 Merge pull request 'actions: run echo and compression tests first' (#326) from earl-warren/end-to-end:wip-compression into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/326
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-11 08:24:49 +00:00
Earl Warren
8bf5b2c802
actions: run echo and compression tests first 2024-11-11 08:30:01 +01:00
earl-warren
a51b472fef Merge pull request 'fix: update the docs branches' (#322) from earl-warren/end-to-end:wip-docs into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/322
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-10 12:06:35 +00:00
Earl Warren
33f3e7eb65
fix: update the docs branches
Closes forgejo/end-to-end#188
2024-11-10 12:09:05 +01:00
earl-warren
946586b807 Merge pull request 'lib: retry longer to allow for slower machines' (#321) from earl-warren/end-to-end:wip-wait into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/321
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-10 08:29:18 +00:00
Earl Warren
aca70a3e54
lib: retry longer to allow for slower machines
The end-to-end tests moved to a slower machine recently. When the
daily releases are build, the end-to-end all run simultaneously and
slow down the machine to a point where it will take more than 30
seconds for a Forgejo instance to start.

Be more forgiving and let it retry for a minute.

https://code.forgejo.org/forgejo/end-to-end/actions/runs/1857/jobs/6
2024-11-10 08:37:44 +01:00
earl-warren
49e99f95d4 Merge pull request 'Set runner log level to Debug' (#303) from Kwonunn/end-to-end:runner-loglevel into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/303
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-28 14:47:56 +00:00
Kwonunn
3433d6ced2 forgot two of the configs 2024-10-28 14:55:49 +01:00
Kwonunn
6508a9e2ca set runner loglevel to debug 2024-10-28 13:52:33 +00:00
earl-warren
2374e25593 Merge pull request 'fix: attempt to avoid database timeouts due to locking' (#295) from Kwonunn/end-to-end:avoid-db-timeout into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/295
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-10-21 06:40:25 +00:00
Kwonunn
3875197a1b fix: attempt to avoid database timeouts due to locking 2024-10-17 11:48:22 +02:00
earl-warren
2db3b373bb Merge pull request 'actions: logs-compression check depends on echo' (#292) from earl-warren/end-to-end:wip-logs-compression into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/292
2024-10-15 12:05:19 +00:00
Earl Warren
f7d1900c5b
actions: logs-compression check depends on echo
There is no guarantee that a test will not reset the actions logs from a
previous test. Since logs-compression depends on the logs from the
echo test, make that dependency explicit.
2024-10-15 13:02:02 +02:00
earl-warren
800cfcc0a8 Merge pull request 'Add test for schedule not being cancelled' (#289) from Kwonunn/end-to-end:schedule-noncancel-test into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/289
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-10-14 05:46:12 +00:00
Kwonunn
222313181f Add schedule-noncancel test to 9.0 suite 2024-10-13 13:57:07 +02:00
Kwonunn
c3eb8918b4 implement waiting based on a file 2024-10-13 12:45:19 +02:00
Kwonunn
631055d190 rewrite schedule cancelling test 2024-10-12 15:11:22 +02:00
Kwonunn
f48fa02916 WIP: Add test for schedule not being cancelled 2024-10-09 15:50:17 +02:00
earl-warren
54f810c1df Merge pull request 'README: update local testing instructions' (#288) from earl-warren/end-to-end:wip-readme into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/288
2024-10-06 15:30:39 +00:00
Earl Warren
294ca18400
README: update local testing instructions 2024-10-06 06:22:58 +02:00
earl-warren
09819336a1 Merge pull request 'v10.0 development cycle started' (#282) from earl-warren/end-to-end:wip-10.0 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/282
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-25 15:16:48 +00:00
Earl Warren
94289bc80d
v10.0 development cycle started 2024-09-25 14:12:49 +02:00
earl-warren
26eefbf61b Merge pull request 'lib: reduce GitLab noise' (#267) from limiting-factor/end-to-end:wip-noise into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/267
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-09-02 10:20:13 +00:00
limiting-factor
1f2f98fb21 lib: reduce GitLab noise
The absence of the test-gitlab container will display

Error response from daemon: No such container: test-gitlab

which can be mistaken as an actual error where in fact it should be
ignored.
2024-09-02 11:45:26 +02:00
earl-warren
4df9a89f4e Merge pull request 'tests: upgrade setup-forgejo to v2.0.2' (#258) from earl-warren/end-to-end:wip-explicit-version into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/258
2024-08-26 06:47:28 +00:00
Earl Warren
427d9ed267
tests: upgrade setup-forgejo to v2.0.2 2024-08-24 08:23:23 +02:00
earl-warren
d3bce65195 Merge pull request 'actions: feature: compression: do not hardcode the log path' (#259) from earl-warren/end-to-end:wip-compression into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/259
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-23 15:30:37 +00:00
Earl Warren
75503c5396
actions: feature: compression: do not hardcode the log path
The log path depends on the previous actions run and may not always
be 01/1.log.zst. Assuming it is makes this test fragile as it is
influenced by which previous tests are run and what they do.
2024-08-23 16:53:03 +02:00
earl-warren
812385a18c Merge pull request 'actions: verify the log compression feature' (#246) from earl-warren/end-to-end:wip-actions-log into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/246
2024-08-15 05:15:36 +00:00
Earl Warren
8636471d63
actions: verify the log compression feature
If running Forgejo >= v9.0, verify the logs are compressed by default
2024-08-11 16:47:14 +02:00
earl-warren
5ad828b7a2 Merge pull request 'lib: source build replace the matching release' (#239) from earl-warren/end-to-end:wip-optimize into main
Reviewed-on: https://code.forgejo.org///forgejo/end-to-end/pulls/239
2024-08-08 16:09:23 +00:00
Earl Warren
149c6a545c
lib: source build replace the matching release
Instead of having an explicit vX.Y-dev version to be referenced
explicitly, a binary built from source replaces the matching
version. For instance, if forgejo/build-from-sources contains v9.0,

* the development branch is compiled from source
* the v9.0 artifact is uploaded
* prior to running any test, the artificat is downloaded and used
* the v9.0 binary is not downloaded from
  forgejo/experimental/integration because it is already present

The vX.Y release is built daily and the end-to-end tests run on it. If
a regression is introduced, it will be spotted within 24h.

Compiling from source is used when the Forgejo runs the end-to-end
suite on a specific pull request.
2024-08-08 17:46:04 +02:00
Earl Warren
427c46dbf9
lib: remove RELEASE_NUMBERS_AND_DEV, use RELEASE_NUMBERS
In the lifecycle of vX.Y.Z, all tests are run against vX.Y-test
before it is published, including when the tag is pushed because the
automated release process now runs end-to-end before pushing the
release to forgejo-experimental.

Running end-to-end against vX.Y-dev is therefore redundant with at least
two other runs with exactly the same SHA (the one before the tag is
pushed and the one when the tag is pushed). There would be value in
doing that if it allowed to detect race conditions in Forgejo. But
such races were not found in the past six months and there is a lot
more scrutiny on commits merged in Forgejo which makes it even less
likely than it was before.

Running the tests on vX.Y instead of also including the built version
provide the same coverage and reduces the workload.
2024-08-08 17:46:04 +02:00
earl-warren
996373c707 Merge pull request 'Forgejo v1.21 is EOL & add v9.0' (#238) from earl-warren/end-to-end:wip-9.0 into main
Reviewed-on: https://code.forgejo.org///forgejo/end-to-end/pulls/238
2024-08-08 14:37:12 +00:00
Earl Warren
6224249696
upgrade: test pprof against the two active stable releases 2024-08-07 11:49:17 +02:00
Earl Warren
0f4173555f
forgejo: fix sources Gitea compatibility
It is cosmetic, keep it accurate.
2024-08-07 11:42:22 +02:00
Earl Warren
af9305b221
README: link to v7.0 documentation instead of v1.21 2024-08-07 11:42:22 +02:00
Earl Warren
944dd98727
test Gitea upgrades with v7.0 and v9.0
the upgrade path from Gitea v1.21 & v1.22 to v8.0 was tested before it
was published. The patch releases for v8.0 will only include bug fixes
and no database upgrades: they are the only kind of changes that could
cause a problem with upgrades.
2024-08-07 11:42:22 +02:00
Earl Warren
d872865242
test Forgejo upgrades starting with v7.0 instead of v1.21 2024-08-07 11:42:22 +02:00
Earl Warren
497a5d76bb
actions: trim v1.20 & v1.21 specific comment 2024-08-07 11:42:22 +02:00
Earl Warren
f46d01885f
packages: alpine: verify supported versions
v8.0-dev should be supported too but it is not LTS: only care for
9.0-dev which is not different for Alpine.
2024-08-07 11:42:22 +02:00
Earl Warren
50c5908a91
Forgejo v1.21 is EOL, v9.0 is dev 2024-08-07 11:42:22 +02:00
earl-warren
47a6f7ee78 Merge pull request 'shfmt -w globally' (#237) from earl-warren/end-to-end:wip-shfmt into main
Reviewed-on: https://code.forgejo.org///forgejo/end-to-end/pulls/237
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-08-07 08:20:51 +00:00
Earl Warren
d5f66e4c0a
shfmt -w globally 2024-08-07 08:31:33 +02:00
earl-warren
4e207414d4 Merge pull request 'forgejo: add 9.0' (#225) from earl-warren/end-to-end:wip-9.0 into main
Reviewed-on: https://code.forgejo.org///forgejo/end-to-end/pulls/225
2024-07-18 08:43:08 +00:00
Earl Warren
2bc5c804ef
forgejo: add 9.0 2024-07-18 08:41:26 +02:00
earl-warren
de08b8c0f5 Merge pull request 'federation: wait for the asynchronous star to land' (#223) from earl-warren/end-to-end:wip-federation into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/223
2024-07-08 08:17:50 +00:00
Earl Warren
ad5790b566
federation: wait for the asynchronous star to land
The check races with the propagation of the star from one forge to the
other. It must wait for it to land instead.
2024-07-08 08:29:20 +02:00
earl-warren
631262b3b9 Merge pull request 'actions: add an example for workflow-dispatch' (#220) from earl-warren/end-to-end:wip-workflow-dispatch into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/220
2024-07-05 10:21:59 +00:00
Earl Warren
05a341e201
actions: add an example for workflow-dispatch
/repos/{owner}/{repo}/actions/workflows/{workflowname}/dispatches

* fails if the required inputs are not provided
* sets defaults to inputs that are not provided

The type of inputs are only used for building the web UI interface,
not for validation. All values are strings.
2024-07-05 07:16:35 +02:00
Earl Warren
64489247aa
actions: run in development mode for debug purposes 2024-07-04 20:15:10 +02:00
earl-warren
63df181d7a Merge pull request 'Revert "actions: use Forgejo runner v3.5.0"' (#218) from earl-warren/end-to-end:wip-runner into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/218
2024-07-02 19:26:50 +00:00
Earl Warren
87df9095b9
Revert "actions: use Forgejo runner v3.5.0"
Do not force the runner version, use whatever default setup-forgejo
provides.

Forcing the version will break the cascading-pr workflow. It will
attempt to download a version that does not exist instead of building
it from sources.

This reverts commit dca3641cf3.
2024-07-02 20:54:27 +02:00
earl-warren
ec9543a6b6 Merge pull request 'lib: enable ActivityPub in GitLab' (#215) from twenty-panda/end-to-end:wip-gitlab into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/215
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-06-29 09:29:02 +00:00
Twenty Panda
b43cfb6e0c cleanup(gitlab): move hardcoded strings to variables [skip ci] 2024-06-25 18:55:19 +02:00
earl-warren
e4fa6d814f Merge pull request 'lib: start & stop GitLab' (#207) from twenty-panda/end-to-end:wip-gitlab into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/207
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-06-23 08:26:40 +00:00
earl-warren
148b7ca98c Merge pull request 'test: make it easier to comment out tests' (#209) from twenty-panda/end-to-end:wip-test into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/209
2024-06-23 08:26:01 +00:00
earl-warren
d99352c80e Merge pull request 'test: upgrade actions/cache@v4' (#208) from twenty-panda/end-to-end:wip-cache into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/208
2024-06-23 08:25:43 +00:00
Twenty Panda
76ac081fb9 lib: start & stop GitLab
The image is saved to disk and cached because it is over 1GB, to save bandwidthc.
2024-06-23 09:16:25 +02:00
Twenty Panda
6b35ea27c3 test: make it easier to comment out tests
When the build stage is commented out, the /srv/forgejo-binaries
directory will not exist. Change the script to work in both cases.
2024-06-23 09:13:36 +02:00
Twenty Panda
cc16df533b test: upgrade actions/cache@v4
Refs: https://code.forgejo.org/forgejo/runner/issues/209
2024-06-23 09:10:52 +02:00
earl-warren
c2b7f36bc8 Merge pull request 'actions: test cache/{restore,save}@v4 support' (#206) from twenty-panda/end-to-end:wip-cache into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/206
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-06-22 19:04:03 +00:00
Twenty Panda
8b3c0a55e7 actions: test cache/{restore,save}@v4 support 2024-06-22 20:27:04 +02:00
Twenty Panda
dca3641cf3 actions: use Forgejo runner v3.5.0 2024-06-22 20:24:47 +02:00
earl-warren
a402d490ba Merge pull request 'upgrades: add Gitea 1.21 & 1.22 to Forgejo 8.0-test' (#205) from twenty-panda/end-to-end:wip-gitea into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/205
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-06-22 11:15:29 +00:00
Twenty Panda
c1ce4361b9 upgrades: add Gitea 1.22.0 & 1.21.11 to Forgejo 8.0-test 2024-06-22 12:42:19 +02:00
earl-warren
9cfd043b8a Merge pull request 'federation: add star scenario' (#196) from earl-warren/end-to-end:wip-federation into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/196
2024-06-07 16:26:04 +00:00
Earl Warren
233b73d7c8
federation: add star scenario
Refs: https://codeberg.org/forgejo/forgejo/pulls/1680
2024-06-04 19:57:31 +02:00
earl-warren
a1b6e192d9 Merge pull request 'federation: stub that checks the nodeinfo of the two instances' (#195) from earl-warren/end-to-end:wip-federation into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/195
2024-06-04 15:32:52 +00:00
Earl Warren
9b6442bfcf
federation: stub that checks the nodeinfo of the two instances 2024-06-04 16:38:32 +02:00
Earl Warren
19ce0fe6b1
lib: add $work_path/forgejo-curl.sh for each Forgejo instance
The $work_path/forgejo-curl.sh for each Forgejo instance is logged
in with admin permissions and ready to use.

The default forgejo-curl.sh remains logged in the last Forgejo
instance that was launched.
2024-06-04 16:30:35 +02:00
Earl Warren
078107026b
lib: get_host_port is $IP:3000 or read from app.ini 2024-06-04 15:29:00 +02:00
Earl Warren
b62866f3ae
lib: move forgejocli to the forgejo instance WORK_PATH
Instead of having it in $DIR so that there can be one forgejocli per
forgejo instance.
2024-06-04 15:29:00 +02:00
Earl Warren
2461666aca
lib: use the WORK_PATH base instead of forgejo for the daemon
Instead of hardcoding "forgejo" as the base for the daemon to store
the PID and the logs, use the base of the WORK_PATH so that a given
work path can run a dedicated forgejo instance by the same name.
2024-06-04 13:04:05 +02:00
Earl Warren
4a19e9c90b
lib: get the base of WORK_PATH from app.ini
instead of hardcoding forgejo-work-path to be the base of WORK_PATH
relative to DIR, read it from the app.ini file. It will allow
multiple Forgejo instances to run simultaneously, each using a
different directory.
2024-06-04 12:00:42 +02:00
earl-warren
6f3f3ec0f2 Merge pull request 'docs(README): remove unhelpful sentence about actions' (#183) from earl-warren/end-to-end:wip-readme into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/183
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-06-01 14:19:12 +00:00
earl-warren
f8dae4b6c1 Merge pull request 'actions: post-7-0-schedule: create /srv/example/post-7-0-schedule/contexts first' (#192) from earl-warren/end-to-end:wip-cron into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/192
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-06-01 14:18:52 +00:00
Earl Warren
9e60ae4449
actions: post-7-0-schedule: create /srv/example/post-7-0-schedule/contexts first
A loop is waiting for /srv/example/post-7-0-schedule-volume/DONE to exist before
declaring the workflow is successfully run. But it is not really until
/srv/example/post-7-0-schedule/contexts is created with the event content and they
will race.

Fixes: https://code.forgejo.org/forgejo/end-to-end/issues/181

Exactly the same as 57fdd1cd49 but for
post-7-0-schedule instead of cron
2024-06-01 09:36:45 +02:00
earl-warren
2b8c2826c5 Merge pull request 'actions: automerge: check when review happens after CI success' (#189) from earl-warren/end-to-end:wip-automerge into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/189
2024-05-30 20:04:55 +00:00
Earl Warren
fcb48eff5c
actions: automerge: check when review happens after CI success 2024-05-28 00:47:02 +02:00
thefox
7fd268b02f Merge pull request 'actions: add automerge example' (#187) from earl-warren/end-to-end:wip-automerge into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/187
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-27 19:28:55 +00:00
Earl Warren
f9e20e7770
actions: add automerge example 2024-05-27 20:57:40 +02:00
Earl Warren
abe9f5f52d
docs(README): remove unhelpful sentence about actions 2024-05-22 11:07:45 +02:00
thefox
c6cd39b074 Merge pull request 'actions: cron: create /srv/example/cron/contexts first' (#182) from earl-warren/end-to-end:wip-cron into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/182
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-21 06:52:08 +00:00
Earl Warren
57fdd1cd49
actions: cron: create /srv/example/cron/contexts first
A loop is waiting for /srv/example/cron-volume/DONE to exist before
declaring the workflow is successfully run. But it is not really until
/srv/example/cron/contexts is created with the event content and they
will race.

Fixes: https://code.forgejo.org/forgejo/end-to-end/issues/181
2024-05-21 08:16:39 +02:00
thefox
657e367db9 Merge pull request 'lib: retry git fetch a few times (take 2)' (#180) from earl-warren/end-to-end:wip-codeberg-retry into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/180
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-20 04:46:11 +00:00
Earl Warren
f6da41ec8e
lib: retry git fetch a few times (take 2)
Wrap the failure in a if statement. Otherwise it will fail the first
time because the script runs under -e
2024-05-20 01:54:22 +02:00
thefox
56fb137646 Merge pull request 'lib: retry git fetch a few times' (#178) from earl-warren/end-to-end:wip-codeberg-retry into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/178
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-19 08:59:09 +00:00
Earl Warren
872e4632bf
lib: retry git fetch a few times
The instance hosting the forgejo repository may be down or very slow
while the build tries to fetch from it, retry a few times instead of
giving up immediately.

A total retry time of 3 * 60 seconds is probably sufficient since
Forgejo startup time is lower than this, even on large instances.
2024-05-19 09:16:55 +02:00
thefox
90e5b72123 Merge pull request 'logs: always prefix with the file name' (#149) from earl-warren/end-to-end:wip-logs into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/149
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-13 19:09:54 +00:00
earl-warren
8d48bb7639 Merge pull request 'actions: push-cancel intermitent failure' (#175) from earl-warren/end-to-end:wip-actions-push-cancel into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/175
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-13 18:33:55 +00:00
Earl Warren
9f55d67bd2
actions: push-cancel intermitent failure
A) When both push happen within the same second, the SHA will be
  identical and there will not be any cancelation.
B) When `sleep infinity` happens after the reload of the runner, it
   will block the following tests forever because it has a capacity of one.

Fixes: https://code.forgejo.org/forgejo/end-to-end/issues/144

2024-05-13T00:58:49.1453499Z actions_verify_example.out:[main (root-commit) cbf3afb] initial commit
2024-05-13T00:58:49.1453528Z actions_verify_example.out: 3 files changed, 28 insertions(+)
2024-05-13T00:58:49.1453556Z actions_verify_example.out: create mode 100644 .forgejo/workflows/test.yml
2024-05-13T00:58:49.1453585Z actions_verify_example.out: create mode 100755 run.sh
2024-05-13T00:58:49.1453611Z actions_verify_example.out: create mode 100644 teardown.sh
2024-05-13T00:58:49.1453638Z actions_verify_example.out:+ git remote add origin http://root:admin1234@10.201.14.172:3000/root/example-push-cancel
2024-05-13T00:58:49.1453669Z actions_verify_example.out:+ git push --force -u origin main
2024-05-13T00:58:49.1453699Z actions_verify_example.out:remote: . Processing 1 references
2024-05-13T00:58:49.1453728Z actions_verify_example.out:remote: Processed 1 references in total
2024-05-13T00:58:49.1453758Z actions_verify_example.out:To http://10.201.14.172:3000/root/example-push-cancel
2024-05-13T00:58:49.1453786Z actions_verify_example.out: * [new branch]      main -> main
2024-05-13T00:58:49.1453814Z actions_verify_example.out:branch 'main' set up to track 'origin/main'.
...
2024-05-13T00:58:49.1458629Z actions_verify_example.out:[main (root-commit) cbf3afb] initial commit
2024-05-13T00:58:49.1458656Z actions_verify_example.out: 3 files changed, 28 insertions(+)
2024-05-13T00:58:49.1458683Z actions_verify_example.out: create mode 100644 .forgejo/workflows/test.yml
2024-05-13T00:58:49.1458711Z actions_verify_example.out: create mode 100755 run.sh
2024-05-13T00:58:49.1458738Z actions_verify_example.out: create mode 100644 teardown.sh
2024-05-13T00:58:49.1458764Z actions_verify_example.out:+ git remote add origin http://root:admin1234@10.201.14.172:3000/root/example-push-cancel
2024-05-13T00:58:49.1458795Z actions_verify_example.out:+ git push --force -u origin main
2024-05-13T00:58:49.1458822Z actions_verify_example.out:Everything up-to-date
2024-05-13 19:42:42 +02:00
earl-warren
888ddb992c Merge pull request 'fix(lib): explicitly set the page limit for releases' (#170) from earl-warren/end-to-end:wip-limit into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/170
2024-05-03 07:13:24 +00:00
Earl Warren
d9fc5cee11
fix(lib): explicitly set the page limit for releases
otherwise it is subject to limitations imposed by the server and as
the number of releases grow, the older ones will no longer be found.
2024-05-03 07:40:34 +01:00
earl-warren
2171ed7a5e Merge pull request 'chore(cleanup): v1.20 is EOL, trim it' (#167) from earl-warren/end-to-end:wip-trim-v1.20 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/167
2024-04-25 13:21:58 +00:00
Earl Warren
c5a35b1ad5
fix(pprof): reset_forgejo before running it
it was working before because the previous tests did it. Now that it
is gone, it no longer worked because there was no app.ini.
2024-04-25 14:24:52 +02:00
Earl Warren
e80f12ace9
chore(cleanup): v1.20 is EOL, trim it 2024-04-25 14:24:50 +02:00
Earl Warren
456dab5002
docs: managing legacy tests and cutting branches 2024-04-25 13:24:51 +02:00
earl-warren
449890d712 Merge pull request 'lib: sort releases in version order' (#164) from earl-warren/end-to-end:wip-find-download into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/164
2024-04-19 15:20:18 +00:00
Earl Warren
4bff22bc37
lib: sort releases in version order
If sorted in alphabetical order v1.21.11 will be lower than v1.21.8
2024-04-19 16:36:38 +02:00
earl-warren
8260f4ac6f Merge pull request 'upgrades: gitea 1.21.10 -> forgejo 7.0.0' (#158) from earl-warren/end-to-end:wip-gitea-upgrade into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/158
2024-04-13 17:04:52 +00:00
Earl Warren
3bd723d6b8
upgrades: gitea 1.21.10 -> forgejo 7.0.0 2024-04-13 16:41:24 +02:00
thefox
9ca95cd19a add 7.0-test to pprof (#148)
Test backport of pprof to 7.0

Closes #143

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/148
Co-authored-by: thefox <thefox@noreply.code.forgejo.org>
Co-committed-by: thefox <thefox@noreply.code.forgejo.org>
2024-04-13 10:42:40 +00:00
Earl Warren
74294d14f0
logs: always prefix with the file name
otherwise it is difficult to figure out where the runner logs end and
where the forgejo logs start.
2024-04-13 12:09:41 +02:00
earl-warren
e9bb6f67e6 Merge pull request 'Revert "temporarily skip 8.0-test"' (#152) from earl-warren/end-to-end:wip-8-0-migration into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/152
2024-04-12 21:43:36 +00:00
TheFox0x7
416db9031b add schedule runs-on variables test for post 7.0 releases (#151)
reimplements: forgejo/end-to-end#146 for 8.0-dev and 8.0-test
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/151
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2024-04-07 20:25:02 +00:00
Earl Warren
05341f1ae0
Revert "temporarily skip 8.0-test"
This reverts commit 174cb37ac9.
2024-04-07 07:45:05 +02:00
earl-warren
1a3b74f520 Merge pull request 'temporarily skip 8.0-test' (#150) from earl-warren/end-to-end:wip-8-0-migration into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/150
2024-04-06 19:59:39 +00:00
Earl Warren
174cb37ac9
temporarily skip 8.0-test
because 7.0-dev contains a migration that is ahead of 8.0 which should
not happen but does today because a PR was backported. The last one.
2024-04-06 16:15:12 +02:00
earl-warren
56110cffcc Merge pull request 'logs: show logs, not just the .out files' (#147) from earl-warren/end-to-end:wip-logs into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/147
2024-04-06 09:58:04 +00:00
Earl Warren
4a6ed59cb6
logs: show logs, not just the .out files 2024-04-06 11:08:05 +02:00
earl-warren
922508d1b5 Merge pull request 'Revert "actions: workaround for possible 404 transient bug on artifacts"' (#145) from earl-warren/end-to-end:wip-fixes into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/145
2024-04-06 07:11:17 +00:00
Earl Warren
e3a6e1fd8a
Revert "actions: workaround for possible 404 transient bug on artifacts"
Refs: https://code.forgejo.org/forgejo/end-to-end/issues/144

This reverts commit 191976a836.
2024-04-05 05:24:04 +02:00
earl-warren
4f34b12bb2 Merge pull request 'add pprof upload test' (#141) from thefox/end-to-end:pprof_upload_test into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/141
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-04-02 18:54:52 +00:00
TheFox0x7
4a82c559b9
run pprof test on test build 2024-04-02 20:15:57 +02:00
earl-warren
dd768c648e Merge pull request 'actions: workaround for possible 404 transient bug on artifacts' (#142) from earl-warren/end-to-end:wip-artifacts into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/142
2024-04-02 09:43:11 +00:00
Earl Warren
191976a836
actions: workaround for possible 404 transient bug on artifacts
Refs: https://codeberg.org/forgejo/forgejo/issues/2949
2024-04-02 07:40:08 +02:00
TheFox0x7
c00a5bfc9c
download profilecli 2024-04-01 19:25:11 +02:00
TheFox0x7
0b216e9851
actually add test to suite 2024-04-01 01:47:56 +02:00
TheFox0x7
5a5b461453
correct version to run against 2024-04-01 01:21:59 +02:00
TheFox0x7
fbe3c3c59c
add pprof test 2024-03-31 22:49:52 +02:00
earl-warren
9a1a91333e Merge pull request 'the forgejo development branch is now 8.0' (#139) from earl-warren/end-to-end:wip-8.0 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/139
2024-03-30 14:26:15 +00:00
Earl Warren
6be26d2a69
the forgejo development branch is now 8.0 2024-03-30 14:44:43 +01:00
earl-warren
0afc6ee868 Merge pull request 'various minor fixes' (#134) from earl-warren/end-to-end:wip-fixes into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/134
2024-03-26 16:48:36 +00:00
Earl Warren
cd377ddbad
actions: push-cancel: fix typo 2024-03-26 09:21:32 +01:00
Earl Warren
d8673b8c0b
actions: pull-request: squash main/setup functions 2024-03-26 08:35:16 +01:00
Earl Warren
36456ee74f
actions: pull-request: assert the existence of contexts
and not the existence of tokens
2024-03-26 08:31:26 +01:00
earl-warren
8b6609ac4b Merge pull request 'tests: the development branch requires go 1.22 to build' (#131) from earl-warren/end-to-end:wip-go-1.22 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/131
2024-03-25 18:09:32 +00:00
Earl Warren
f3ec6704ba
tests: the development branch requires go 1.22 to build 2024-03-25 18:26:07 +01:00
earl-warren
d69a12b4af Merge pull request 'actions: services: cover the case when no container is specified' (#127) from earl-warren/end-to-end:wip-regression into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/127
2024-03-24 11:03:25 +00:00
Earl Warren
be033071a4
actions: services: cover the case when no container is specified
When the container for running the steps is specificied, it is setup
differently than when it is implicit. This test adds coverage for both
instead of running all examples with an explicitly specified container
image.
2024-03-24 10:51:02 +01:00
earl-warren
4f3e03b917 Merge pull request 'actions: Forgejo 7.0 is equivalent to 7.0-test and run artifacts v4' (#124) from earl-warren/end-to-end:wip-artifacts-v4 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/124
2024-03-21 17:02:05 +00:00
Earl Warren
13f18f9f47
actions: Forgejo 7.0 is equivalent to 7.0-test and run artifacts v4 2024-03-21 17:16:05 +01:00
Earl Warren
a9a46b7b7d
actions: display the runner version 2024-03-21 15:34:38 +01:00
earl-warren
73ef53dce5 Merge pull request 'actions: test {upload,download}-artifacts@v4 support' (#121) from earl-warren/end-to-end:wip-artifacts-v4 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/121
2024-03-21 14:16:04 +00:00
Earl Warren
e1fd4cbc0f
actions: test {upload,download}-artifacts@v4 support
If Forgejo version is >= 7.0 and Forgejo runner > 3.3.0 artifacts@v4
are tested to work with a forked modified version that claims to be
compatible.
2024-03-21 14:25:28 +01:00
earl-warren
c461ace62b Merge pull request 'lib: ORGANIZATIONS ordered list' (#118) from twenty-panda/end-to-end:wip-actions into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/118
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-03-20 19:14:52 +00:00
Twenty Panda
02d263e212 lib: ORGANIZATIONS ordered list
they determine the order in which Forgejo binaries will be looked
up. It is moved to a file so it can be overriden to change the order.
2024-03-20 19:49:21 +01:00
Twenty Panda
4e517fb4df outputs do not cross local actions 2024-03-20 19:44:15 +01:00
Twenty Panda
f4c266f6b2 actions: add step to show logs 2024-03-20 19:44:00 +01:00
Earl Warren
dd5d55f032
upgrade to cascading-pr@v2.1
Closes: https://code.forgejo.org/forgejo/end-to-end/issues/114
2024-03-20 16:53:29 +01:00
earl-warren
8c9d1ff068 Merge pull request 'versions must be strings' (#113) from twenty-panda/end-to-end:wip-actions into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/113
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-03-20 14:37:57 +00:00
Twenty Panda
473c9820c9 versions must be strings 2024-03-20 14:54:17 +01:00
Twenty Panda
8d8994f7ea always cache minio & garage binaries
they are sometime very slow to download and it does not help to do it
five times for each workflow
2024-03-20 14:54:17 +01:00
earl-warren
b8c71e7201 Merge pull request 'merge actions test into end-to-end.sh' (#112) from twenty-panda/end-to-end:wip-actions into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/112
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-03-20 13:18:28 +00:00
Twenty Panda
96f91063c9 merge actions test into end-to-end.sh
* replace the high level test running actions tests with end-to-end.sh
* set DOMAIN to the IP instead of 127.0.0.1 for runner <-> forgejo communications
* move forgejo_cli from a function to a file so that it can be used by forgejo-runner.sh
* keep the documentation updates workflows separate because they need to open one PR per version
2024-03-20 13:42:44 +01:00
earl-warren
ee1b082c3f Merge pull request 'Add E2E test for Alpine package with noarch architecture' (#110) from twenty-panda/end-to-end:wip-alpine into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/110
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-03-17 20:46:14 +00:00
Twenty Panda
81eebc10d8 show the full logs in a separate step for forensic analysis 2024-03-17 21:19:13 +01:00
Twenty Panda
b563e5cd19 packages: Add E2E test for Alpine package with noarch
Refs: https://code.forgejo.org/forgejo/end-to-end/pulls/75
2024-03-17 21:08:13 +01:00
earl-warren
5bb5e037ce Merge pull request 'add editorconfig to help with Forgejo space display' (#92) from earl-warren/end-to-end:wip-editorconfig into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/92
2024-03-17 19:04:35 +00:00
earl-warren
8034186267 Merge pull request 'split tests into upgrades, storages and packages' (#108) from twenty-panda/end-to-end:wip-versions into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/108
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-03-17 18:21:25 +00:00
Twenty Panda
6bb5e947fb upgrades: run doctor check --all after each upgrade 2024-03-17 18:22:31 +01:00
Twenty Panda
21920b10d9 upgrades: add LFS assert 2024-03-17 18:22:22 +01:00
Twenty Panda
51f7263dee hide expected errors so they are not confused with actual errors 2024-03-17 17:56:03 +01:00
Twenty Panda
554d2b48c0 split storage & ugprade and separate fixtures 2024-03-17 17:56:03 +01:00
Twenty Panda
bf689a2478 refactor end-to-end.yml workflow to use a top-level end-to-end.sh 2024-03-17 16:27:35 +01:00
earl-warren
62f75aa56f Merge pull request 'unify packages & upgrades' (#107) from twenty-panda/end-to-end:wip-lib into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/107
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-03-15 13:15:00 +00:00
Twenty Panda
2bb546d366 upgrades: run on LXC to allow for running docker 2024-03-15 19:54:34 +07:00
Twenty Panda
f321bf5d5e upgrades: test_successful_upgrades must stop lingering Forgejo 2024-03-15 19:54:34 +07:00
Twenty Panda
8f0f6537c6 upgrades: use setup-forgejo as a helper to setup docker & user 2024-03-15 19:54:34 +07:00
Twenty Panda
9ff495254a packages: simplify the setup to use the same as upgrades
the packages tests control which Forgejo version they run against so
they can test a feature on version X+1 and not on version X
2024-03-15 19:54:34 +07:00
Twenty Panda
dd35a9f1a8 lib: import generic helpers from upgrades 2024-03-15 19:54:34 +07:00
Twenty Panda
8347d9e040 upgrades; move SUDO and verbosity control to lib 2024-03-15 13:17:01 +07:00
Twenty Panda
bf6ece0f52 README: v7.0.0-test is known as v7.0-test 2024-03-15 13:15:54 +07:00
Twenty Panda
3ead37ed37 upgrades: use the host IP instead of 0.0.0.0
otherwise it cannot be used when running from a LXC/docker container
2024-03-15 12:37:17 +07:00
earl-warren
e0c4025af5 Merge pull request 'upgrades: remove ad-hoc code and use forgejo-curl.sh instead' (#106) from twenty-panda/end-to-end:wip-forgejo-curl into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/106
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-03-15 03:48:19 +00:00
Twenty Panda
f4d0c03302 upgrades: remove ad-hoc code and use forgejo-curl.sh instead 2024-03-15 10:21:58 +07:00
earl-warren
d7e067b418 Merge pull request 'run upgrades on the development version' (#103) from twenty-panda/end-to-end:wip-cidr into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/103
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-03-14 10:11:17 +00:00
Twenty Panda
b011f038aa upgrades: split v1.20 & database v3 tests in separate files 2024-03-14 16:51:34 +07:00
Twenty Panda
be86fe2e44 upgrade: RELEASE_NUMBERS is a variable with all known releases
the development branch is not build for v1.21 & v1.20 because they
pre-date the hard fork and near EOL
2024-03-14 16:51:34 +07:00
Twenty Panda
aa83694fd7 upgrades: leftovers in the avatars storage is not important, ignore 2024-03-14 16:51:34 +07:00
Twenty Panda
dcab318b4a upgrades: prefix the logs with the filename for debugging 2024-03-14 16:51:34 +07:00
Twenty Panda
8bc234e82f upgrades: verify S3 storage works on v1.21 & v7.0 2024-03-14 16:51:34 +07:00
Twenty Panda
1546793d0a upgrades: verify storage settings on the latest v1.21 & v7.0 2024-03-14 16:51:34 +07:00
Twenty Panda
bc55c01cc6 upgrades: the X.Y version is equivalent to the latest patch release 2024-03-14 16:51:34 +07:00
Twenty Panda
4dc1068027 upgrade: fix the version number
FORGEJO_VERSION=$semver must be set for make backend
2024-03-14 16:51:34 +07:00
Twenty Panda
77b08e6e33 upgrades: fix path to test-upgrade.sh 2024-03-14 16:51:34 +07:00
Twenty Panda
67dcb074ea use CIDR in insecure-registries example 2024-03-14 16:51:34 +07:00
Earl Warren
f1fa7c581f
add editorconfig to help with Forgejo space display 2024-02-28 18:49:46 +01:00
188 changed files with 4639 additions and 1730 deletions

1
.dockerignore Normal file
View file

@ -0,0 +1 @@
.git

10
.editorconfig Normal file
View file

@ -0,0 +1,10 @@
root = true
[*]
indent_style = space
indent_size = 4
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

View file

@ -0,0 +1,41 @@
inputs:
built:
description: 'True if a source build is available, false otherwise'
runs:
using: "composite"
steps:
- name: cache S3 binaries
id: S3
uses: https://data.forgejo.org/actions/cache@v4
with:
path: |
/usr/local/bin/minio
/usr/local/bin/mc
/usr/local/bin/garage
key: S3
- uses: https://data.forgejo.org/actions/setup-forgejo@v3.1.6
with:
install-only: true
- run: forgejo-binary.sh ensure_user forgejo
- name: inputs context dump for debug
run: |
set -x
cat <<EOF
${{ toJSON(inputs) }}
EOF
- uses: actions/download-artifact@v3
if: ${{ inputs.built == 'yes' }}
with:
name: forgejo-dev
path: /srv/forgejo-binaries
- name: chown/chmod /srv/forgejo-binaries
run: |
mkdir -p /srv/forgejo-binaries
chown -R forgejo /srv/forgejo-binaries
chmod -R +x /srv/forgejo-binaries
- run: |
script=$(pwd)/end-to-end.sh
$script run dependencies
$script clobber

View file

@ -0,0 +1,11 @@
inputs:
scope:
description: 'Scope of the coverage'
runs:
using: "composite"
steps:
- uses: actions/upload-artifact@v3
with:
name: coverage-${{ inputs.scope }}
path: /tmp/forgejo-end-to-end/coverage

View file

@ -1,82 +0,0 @@
#
#
# https://code.forgejo.org/forgejo/end-to-end/settings/actions
#
# secrets.CASCADE_DOCS_ORIGIN_TOKEN
# https://code.forgejo.org/forgejo-ci scope write:issue, read:repository, read:user
# vars.CASCADE_DOCS_DESTINATION_DOER
# forgejo-cascading-pr (https://codeberg.org/forgejo-cascading-pr)
# secrets.CASCADE_DOCS_DESTINATION_TOKEN
# https://codeberg.org/forgejo-cascading-pr scope write:issue, write:repository, read:user
# vars.CASCADE_DOCS_FORCE_VERSION
# replace the generated documentation for a given version even if it has already
# been generated (e.g. v7.0.0-test)
#
on:
pull_request:
push:
branches:
- 'main'
jobs:
actions:
runs-on: self-hosted
strategy:
matrix:
info:
- version: v7.0
branch: next
forgejo: https://codeberg.org
repo: forgejo-experimental/forgejo
tests: ${{ vars.V7_0_TESTS }}
- version: v1.21
forgejo: https://codeberg.org
repo: forgejo/forgejo
tests: ${{ vars.V1_21_TESTS }}
- version: v1.20
forgejo: https://codeberg.org
repo: forgejo/forgejo
tests: ${{ vars.V1_20_TESTS }}
steps:
- uses: actions/checkout@v4
- uses: https://code.forgejo.org/actions/setup-forgejo@v2
with:
install-only: true
- name: run
id: run
if: matrix.info.tests != 'none'
shell: bash
run: |
set -x
forgejo-binary.sh ensure_user forgejo
full_version=$(curl -sS ${{ matrix.info.forgejo }}/api/v1/repos/${{ matrix.info.repo }}/releases | jq -r '.[] | .tag_name | select(startswith("${{ matrix.info.version }}"))' | sort -r | head -1)
binary=${{ matrix.info.forgejo }}/${{ matrix.info.repo }}/releases/download/${full_version}/forgejo-${full_version#v}-linux-amd64
export DIR=$(mktemp -d)
chown forgejo $DIR /srv
su -c "actions/run.sh $binary $full_version ${{ matrix.info.version }} ${{ matrix.info.tests }}" forgejo
echo full_version="$full_version" >> $GITHUB_OUTPUT
- name: update documentation
if: matrix.info.tests != 'none' && github.ref == 'refs/heads/main'
uses: https://code.forgejo.org/actions/cascading-pr@v1
with:
origin-url: ${{ env.GITHUB_SERVER_URL }}
origin-repo: ${{ github.repository }}
origin-token: ${{ secrets.CASCADE_DOCS_ORIGIN_TOKEN }}
origin-ref: refs/heads/main
destination-url: https://codeberg.org
destination-fork-repo: ${{ vars.CASCADE_DOCS_DESTINATION_DOER }}/docs
destination-repo: forgejo/docs
destination-branch: ${{ matrix.info.branch || matrix.info.version }}
destination-token: ${{ secrets.CASCADE_DOCS_DESTINATION_TOKEN }}
prefix: ${{ env.GITHUB_REPOSITORY }}-${{ matrix.info.version }}
update: .forgejo/cascading-docs
env:
FORCE_VERSION: "${{ vars.CASCADE_DOCS_FORCE_VERSION }}"
VERSION: "${{ steps.run.outputs.full_version }}"

View file

@ -0,0 +1,166 @@
#
#
# https://code.forgejo.org/forgejo/end-to-end/settings/actions
#
on:
pull_request:
push:
branches:
- 'main'
enable-email-notifications: true
jobs:
build:
runs-on: docker
container:
image: 'data.forgejo.org/oci/node:24-trixie'
outputs:
built: "${{ steps.build.outputs.built }}"
forgejo_versions_json: "${{ steps.build.outputs.forgejo_versions_json }}"
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- uses: https://data.forgejo.org/actions/setup-go@v5
with:
go-version: "1.25"
- name: lib/build.sh
id: build
run: |
mkdir $d /tmp/forgejo-upload
touch /tmp/forgejo-upload/PLACEHOLDER
if ! test -f forgejo/build-from-sources; then
echo forgejo/build-from-sources is not present, do not build any version from source
source lib/lib.sh
echo "forgejo_versions_json=$(node -p "JSON.stringify(process.argv[1].split(' '))" "$RELEASE_NUMBERS")" >> $FORGEJO_OUTPUT
echo "built=no" >> $FORGEJO_OUTPUT
exit 0
fi
set -x
#
# SQLite needs gcc to be compiled
#
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get -q install -y -qq build-essential
d=/tmp/forgejo-binaries
for version in $(cat forgejo/build-from-sources) ; do
lib/build.sh $version $d
forgejo=$d/forgejo-$version-dev
$forgejo --version
mv $forgejo /tmp/forgejo-upload/forgejo-$version
done
echo "forgejo_versions_json=$(node -p "JSON.stringify(process.argv[1].split(' '))" "$(cat forgejo/build-from-sources)")" >> $FORGEJO_OUTPUT
echo "built=yes" >> $FORGEJO_OUTPUT
- name: steps context dump for debug
run: |
set -x
cat <<EOF
${{ toJSON(steps) }}
EOF
- uses: actions/upload-artifact@v3
if: ${{ steps.build.outputs.built == 'yes' }}
with:
name: forgejo-dev
path: /tmp/forgejo-upload
packages:
needs: [build]
runs-on: lxc-trixie
strategy:
matrix:
forgejo_version: ${{ fromJSON(needs.build.outputs.forgejo_versions_json) }}
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/prepare-end-to-end
with:
built: ${{ needs.build.outputs.built }}
- run: su forgejo -c "./end-to-end.sh test_packages ${{ matrix.forgejo_version }}"
- if: ${{ needs.build.outputs.built == 'yes' }}
uses: ./.forgejo/upload-coverage
with:
scope: packages
- name: full logs
if: always()
run: su forgejo -c "./end-to-end.sh show_logs"
actions:
needs: [build]
runs-on: lxc-trixie
strategy:
matrix:
forgejo_version: ${{ fromJSON(needs.build.outputs.forgejo_versions_json) }}
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/prepare-end-to-end
with:
built: ${{ needs.build.outputs.built }}
- run: ./end-to-end.sh prepare_dockerd
- run: su forgejo -c "./end-to-end.sh test_actions ${{ matrix.forgejo_version }}"
- if: ${{ needs.build.outputs.built == 'yes' }}
uses: ./.forgejo/upload-coverage
with:
scope: actions
- name: full logs
if: always()
run: su forgejo -c "./end-to-end.sh show_logs"
federation:
needs: [build]
runs-on: lxc-trixie
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/prepare-end-to-end
with:
built: ${{ needs.build.outputs.built }}
- name: install zstd
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get -q install -y -qq zstd
- name: cache GitLab OCI image
uses: https://data.forgejo.org/actions/cache@v4
with:
path: |
/srv/forgejo-binaries/gitlab
key: gitlab
- name: setup dbus
run: |
apt-get -q install -y -qq dbus
systemctl enable --now dbus
- name: run test_federation
run: |
chown -R forgejo:forgejo .
su forgejo -c "./end-to-end.sh test_federation"
- if: ${{ needs.build.outputs.built == 'yes' }}
uses: ./.forgejo/upload-coverage
with:
scope: federation
- name: full logs
if: always()
run: su forgejo -c "./end-to-end.sh show_logs"
upgrade:
name: upgrade and storage
needs: [build]
runs-on: lxc-trixie
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/prepare-end-to-end
with:
built: ${{ needs.build.outputs.built }}
- run: su forgejo -c "./end-to-end.sh test_upgrades"
- run: su forgejo -c "./end-to-end.sh test_storage"
- if: ${{ needs.build.outputs.built == 'yes' }}
uses: ./.forgejo/upload-coverage
with:
scope: upgrade
- name: full logs
if: always()
run: su forgejo -c "./end-to-end.sh show_logs"

View file

@ -1,43 +0,0 @@
on:
pull_request:
push:
branches:
- 'main'
jobs:
packages:
runs-on: self-hosted
strategy:
matrix:
info:
- version: v7.0
branch: next
forgejo: https://codeberg.org
repo: forgejo-experimental/forgejo
tests: ${{ vars.V7_0_TESTS }}
- version: v1.21
forgejo: https://codeberg.org
repo: forgejo/forgejo
tests: ${{ vars.V1_21_TESTS }}
steps:
- uses: actions/checkout@v4
- uses: https://code.forgejo.org/actions/setup-forgejo@v2
with:
install-only: true
- name: run
if: matrix.info.tests != 'none'
shell: bash
run: |
set -x
forgejo-binary.sh ensure_user forgejo
full_version=$(curl -sS ${{ matrix.info.forgejo }}/api/v1/repos/${{ matrix.info.repo }}/releases | jq -r '.[] | .tag_name | select(startswith("${{ matrix.info.version }}"))' | sort -r | head -1)
binary=${{ matrix.info.forgejo }}/${{ matrix.info.repo }}/releases/download/${full_version}/forgejo-${full_version#v}-linux-amd64
export DIR=$(mktemp -d)
chown forgejo $DIR /srv
export VERBOSE="${{ vars.VERBOSE || false }}"
su -c "packages/run.sh $binary $full_version ${{ matrix.info.version }} ${{ matrix.info.tests }}" forgejo

View file

@ -1,41 +0,0 @@
name: upgrade
on:
pull_request:
push:
branches:
- 'main'
jobs:
upgrade:
runs-on: docker
container:
image: 'docker.io/node:20-bookworm'
steps:
- name: cache S3 binaries
id: S3
uses: https://code.forgejo.org/actions/cache@v3
with:
path: |
/usr/local/bin/minio
/usr/local/bin/mc
/usr/local/bin/garage
key: S3
- name: skip if S3 cache hit
if: steps.S3.outputs.cache-hit != 'true'
run: echo no hit
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.21"
- run: |
git config --add safe.directory '*'
adduser --quiet --comment forgejo --disabled-password forgejo
chown -R forgejo:forgejo .
- run: |
script=$(pwd)/forgejo/upgrades/test-upgrade.sh
$script run dependencies
$script clobber
su forgejo -c "$script test_upgrades"

3
.gitignore vendored
View file

@ -1,12 +1,9 @@
*~
forgejo-api
forgejo-header
forgejo-ip
forgejo-runner-home
forgejo-runner-pid
forgejo-runner-token
forgejo-runner.clientpid
forgejo-runner.log
forgejo-token
.runner
#*

50
Dockerfile Normal file
View file

@ -0,0 +1,50 @@
FROM data.forgejo.org/oci/node:24-trixie
ENV PATH=$PATH:/setup-forgejo
ENV _CONTAINERS_USERNS_CONFIGURED=""
RUN apt-get update && \
apt-get --assume-yes --no-install-recommends install \
aardvark-dns \
ca-certificates \
curl \
daemon \
fuse-overlayfs \
gettext \
git \
jq \
libcap2-bin \
neovim \
nftables \
passt \
podman \
podman-compose \
podman-docker \
procps \
pup \
slirp4netns \
sudo \
tcpdump \
uidmap \
wget && \
adduser -u 1001 forgejo-tests && \
groupadd wheel && \
adduser forgejo-tests wheel && \
echo "%wheel ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers && \
echo "forgejo-tests:10000:9999" > /etc/subuid && \
echo "forgejo-tests:10000:9999" > /etc/subgid && \
mkdir /srv/forgejo-binaries && \
chown forgejo-tests:forgejo-tests /srv/forgejo-binaries && \
apt-get clean && \
apt-get autoremove --purge && \
apt-get autoclean
COPY --chown=1001:1001 . /e2e
RUN git clone https://code.forgejo.org/actions/setup-forgejo.git /setup-forgejo
USER forgejo-tests
WORKDIR /e2e
ENTRYPOINT /bin/bash

162
README.md
View file

@ -1,16 +1,36 @@
# Forgejo end-to-end tests
- [Forgejo end-to-end tests](#forgejo-end-to-end-tests)
- [Removing legacy tests](#removing-legacy-tests)
- [Hacking](#hacking)
- [Running from locally built binary](#running-from-locally-built-binary)
- [Forgejo](#forgejo)
- [Forgejo runner](#forgejo-runner)
- [Running from locally built container image](#running-from-locally-built-container-image)
- [Running actions tests locally](#running-actions-tests-locally)
- [Running federation tests locally](#running-federation-tests-locally)
- [Federated Mastodon Follow Test](#federated-mastodon-follow-test)
- [Running other tests locally](#running-other-tests-locally)
- [Running tests in Docker/Podman](#running-tests-in-dockerpodman)
A series of tests scenarios and assertions covering
[Forgejo](https://codeberg.org/forgejo/forgejo) and the [Forgejo
runner](https://code.forgejo.org/forgejo/runner). They partially rely
on [Forgejo actions](https://code.forgejo.org/actions) developped
specifically for testing such as
[setup-forgejo](https://code.forgejo.org/actions/setup-forgejo).
runner](https://code.forgejo.org/forgejo/runner).
They are designed to run using Forgejo releases and development
versions compiled from designated repositories.
# Hacking
## Removing legacy tests
End-to-end tests cover the supported range of releases and when one of
them is EOL, it must be removed as well as the tests that target it
specifically. Otherwise the test suite would grow indefinitely.
When a release is EOL, a branch is cut with a name following the
pattern `legacy/vX.Y-vA.B`. For instance when `v8.0` is published and
`v1.21` is EOL, the branch `legacy/v8.0-v1.21` is cut.
## Hacking
docker and sudo must be installed with insecure registries allowed in
/etc/docker/daemon.json for the IP that will be used for forgejo such
@ -18,111 +38,117 @@ as:
```json
{
"insecure-registries": [ "10.80.4.76:3000" ]
"insecure-registries": [ "10.0.0.0/8" ]
}
```
```
Use setup-forgejo from source.
The [setup-forgejo](https://code.forgejo.org/actions/setup-forgejo)
repository is a [Forgejo
Action](https://forgejo.org/docs/v1.21/user/actions/) which is meant
Action](https://forgejo.org/docs/v7.0/user/actions/) which is meant
to be used in workflows. However, it is implemented as shell scripts that
can also be used to create Forgejo instances and runners locally. This
is convenient for testing and the reason why it needs to be added to the PATH.
For instance, it is a dependency of the `actions/run.sh` script.
For instance, it is a dependency of the `end-to-end.sh` script.
```sh
git clone https://code.forgejo.org/actions/setup-forgejo
export PATH=$(pwd)/setup-forgejo:$PATH
git clone https://code.forgejo.org/forgejo/end-to-end
cd end-to-end
export DIR=/tmp/end-to-end
rm -fr /tmp/end-to-end ; sudo rm -fr /srv/example ; sudo mkdir /srv/example ; sudo chown -R $USER /srv/example
```
Run using Forgejo built from source.
### Running from locally built binary
Before injecting a manually built binary, make sure a simple test was
run so that the directories are populated.
#### Forgejo
From a checkout of https://codeberg.org/forgejo/forgejo/
```sh
make TAGS='bindata sqlite sqlite_unlock_notify' generate forgejo
cp -a forgejo $DIR/forgejo
make clean-all && make frontend && make TAGS='bindata sqlite sqlite_unlock_notify' generate forgejo
cp -a forgejo /srv/forgejo-binaries/forgejo-11.0
```
## Running actions locally
It will be used whenever the version `11.0` is specified in a test.
#### Forgejo runner
From a checkout of https://code.forgejo.org/forgejo/runner
```sh
make --always-make forgejo-runner
cp forgejo-runner /tmp/forgejo-end-to-end/forgejo-runner
```
### Running from locally built container image
```bash
docker buildx build --output=type=docker --tag codeberg.org/forgejo/forgejo:latest .
```
## Running actions tests locally
To run and debug workflows from `actions/example-*`, from the root of
the source directory, with docker and forgejo-curl.sh installed, mimic
what `.forgejo/workflows/actions.yml` does. There may be some manual
what `.forgejo/workflows/end-to-end.yml` does. There may be some manual
tweaking (such as creating temporary directories) because the tests
run as root in the context of Forgejo Actions and assume they have
admin permissions. But they do not need to run as root and must work
fine when run as a regular user.
Run one example
```sh
actions/run.sh https://codeberg.org/forgejo-experimental/forgejo/releases/download/v7.0.0-test/forgejo-7.0.0-test-linux-amd64 v7.0.0-test v7_0 cron # runs actions/example-cron
export FORGEJO_RUNNER_LOGS=/tmp/forgejo-end-to-end/forgejo-runner.log
./end-to-end.sh run dependencies
./end-to-end.sh actions_setup 10.0
firefox 0.0.0.0:3000 # user root / admin1234
./end-to-end.sh actions_verify_example echo
./end-to-end.sh actions_teardown
```
Cleanup. It will teardown Forgejo & the runner and not run them because there is nothing to test.
Note that `with-docker-tcp` requires the docker daemon listens to
tcp://127.0.0.1:2375. See `actions/actions.sh` for how to do that.
## Running federation tests locally
To run and debug scenarios from `federation/*`, from the root of
the source directory, mimic what `.forgejo/workflows/end-to-end.yml` does.
```sh
actions/run.sh https://codeberg.org/forgejo-experimental/forgejo/releases/download/v7.0.0-test/forgejo-7.0.0-test-linux-amd64 v7.0.0-test v7_0 none
./end-to-end.sh run dependencies
./end-to-end.sh federation_setup 12.0
firefox 0.0.0.0:3001 # user root / admin1234
firefox 0.0.0.0:3002 # user root / admin1234
firefox 0.0.0.0:3003 # user root / admin1234
./end-to-end.sh federation_verify_scenario star
./end-to-end.sh federation_verify_scenario gotosocial
./end-to-end.sh federation_verify_scenario mastodon
./end-to-end.sh federation_teardown
```
Run all examples for v7_0
## Running other tests locally
To run and debug tests, from the root of the source directory.
Run one test. When the test fails the instance can be inspected at http://0.0.0.0:3000
```sh
actions/run.sh https://codeberg.org/forgejo-experimental/forgejo/releases/download/v7.0.0-test/forgejo-7.0.0-test-linux-amd64 v7.0.0-test v7_0
./end-to-end.sh test_packages_alpine
./end-to-end.sh test_storage_stable_s3 minio
```
Run from sources
Cleanup. It will teardown the Forgejo instance.
```sh
make TAGS='bindata sqlite sqlite_unlock_notify' generate forgejo
cp -a forgejo $DIR/forgejo
./end-to-end.sh stop
```
Remote testing
## Running tests in Docker/Podman
To reduce the runtime the following variables can be set to control
the number of cases run by the
[actions](.forgejo/workflows/actions.yml) tests. If set to
**none** they are not run at all for that version of Forgejo. If
it does not exist, all tests are run.
* `v7_0_TESTS`
* `V1_21_TESTS`
* `V1_20_TESTS`
## Running packages locally
To run and debug package tests, from the root of the source directory.
Run one test
```sh
packages/run.sh https://codeberg.org/forgejo-experimental/forgejo/releases/download/v7.0.0-test/forgejo-7.0.0-test-linux-amd64 v7.0.0-test v7_0 alpine # runs packages/alpine.sh
```
Cleanup. It will teardown Forgejo and not run them because there is nothing to test.
```sh
packages/run.sh https://codeberg.org/forgejo-experimental/forgejo/releases/download/v7.0.0-test/forgejo-7.0.0-test-linux-amd64 v7.0.0-test v7_0 none
```
Run all examples for v7_0
```sh
packages/run.sh https://codeberg.org/forgejo-experimental/forgejo/releases/download/v7.0.0-test/forgejo-7.0.0-test-linux-amd64 v7.0.0-test v7_0
```
Remote testing
To reduce the runtime the following variables can be set to control
the number of cases run by the
[packages test](.forgejo/workflows/packages.yml) tests. If set to
**none** they are not run at all for that version of Forgejo. If
it does not exist, all tests are run.
* `v7_0_PACKAGES_TESTS`
* `V1_21_PACKAGES_TESTS`
There is an included Dockerfile in which the tests can be run. Building the
conatiner will copy the the entire repo state into the container from which
changes to the tests can be tested. Note: running in podman requires the
`--privileged` flag because this will run podman in podman for some tests.

189
actions/actions.sh Executable file
View file

@ -0,0 +1,189 @@
# Copyright 2024 The Forgejo Authors
# SPDX-License-Identifier: MIT
ACTIONS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
function actions_export_variables() {
export HOST_PORT
export url=http://${FORGEJO_USER}:${FORGEJO_PASSWORD}@${HOST_PORT}
export token=$(cat $DOT_FORGEJO_CURL/token)
}
function actions_verify_feature() {
local feature=$1
actions_export_variables
export FEATURE_DIR=$ACTIONS_DIR/feature-$feature
echo "============================ RUN feature-$feature ==================="
bash -ex $FEATURE_DIR/run.sh || return 1
}
function actions_verify_example() {
local example=$1
actions_export_variables
actions_cleanup_example_volume
export example
export EXAMPLE_DIR=$ACTIONS_DIR/example-$example
if test -f $EXAMPLE_DIR/setup.sh; then
echo "============================ SETUP example-$example ==================="
bash -ex $EXAMPLE_DIR/setup.sh || return 1
fi
if test -f $EXAMPLE_DIR/run.sh; then
echo "============================ RUN example-$example ==================="
bash -ex $EXAMPLE_DIR/run.sh || return 1
else
forgejo-test-helper.sh run_workflow actions/example-$example $url root example-$example $example $token || return 1
fi
if test -f $EXAMPLE_DIR/teardown.sh; then
echo "============================ TEARDOWN example-$example ==================="
bash -ex $EXAMPLE_DIR/teardown.sh || return 1
fi
actions_save_contexts $example
}
function actions_save_contexts() {
local example="$1"
if test -d /srv/example/$example/contexts; then
mkdir -p /srv/contexts
rsync -av /srv/example/$example/contexts/ /srv/contexts/$example/
fi
}
function actions_cleanup_example_volume() {
if test $(id -u) != 0; then
$SUDO chown $(id -u) /srv
fi
if ! test -d /srv/example; then
mkdir -p /srv/example
return
fi
$SUDO rm -fr /srv/example/*
}
function actions_setup() {
local version=$1
actions_teardown
reset_forgejo $ACTIONS_DIR/default-app.ini
start_forgejo $version
export FORGEJO_RUNNER_LOGS=$DIR/forgejo-runner.log
actions_cleanup_example_volume
export FORGEJO_RUNNER_CONFIG=$ACTIONS_DIR/runner-config.yaml
forgejo-runner.sh setup '' '' http://${HOST_PORT}
}
function actions_teardown() {
forgejo-curl.sh logout
forgejo-runner.sh teardown
stop_forgejo
}
function actions_runner_version() {
local runner_version=$($DIR/forgejo-runner --version | sed -n -e 's/forgejo-runner version v//p')
if test -z "$runner_version"; then
$DIR/forgejo-runner --version
echo failed to parse version
false
fi
echo $runner_version
}
function prepare_dockerd() {
mkdir -p /etc/systemd/system/docker.service.d
cat >/etc/systemd/system/docker.service.d/override.conf <<'EOF'
[Service]
ExecStart=
ExecStart=/usr/sbin/dockerd -H unix:///var/run/docker.sock -H tcp://127.0.0.1:2375 --containerd=/run/containerd/containerd.sock $DOCKER_OPTS
EOF
systemctl daemon-reload
if ! systemctl restart docker.service; then
journalctl --no-pager --unit docker.service
return 1
fi
netstat -lntp | grep 127.0.0.1:2375
}
function test_actions() {
local versions="${1:-$RELEASE_NUMBERS}"
for version in $versions; do
actions_setup $version
local runner_version=$(actions_runner_version)
log_info "Testing actions with Forgejo $version & Forgejo runner $runner_version"
run actions_verify_example with-docker-tcp
if dpkg --compare-versions $runner_version gt 5.0.2; then
for example in with-docker-host with-docker-socket without-docker-socket; do
run actions_verify_example $example
done
fi
if dpkg --compare-versions $runner_version gt 10.0.0; then
run actions_verify_example force-rebuild
fi
if dpkg --compare-versions $version ge 7.0 && dpkg --compare-versions $runner_version gt 3.3.0; then
for example in artifacts-v4; do
run actions_verify_example $example
done
fi
for example in echo matrix needs workflow-call lxc config-options cache cache-pull-request checkout service container expression local-action docker-action if if-fail push tag push-cancel artifacts pull-request context private-workflow-call create-runner-file; do
run actions_verify_example $example
done
if dpkg --compare-versions $runner_version ge 6.3.0; then
run actions_verify_example cache-proxy
fi
if dpkg --compare-versions $runner_version ge 8.0.0; then
run actions_verify_example shell
fi
if dpkg --compare-versions $version lt 7.1; then
for example in cron; do
run actions_verify_example $example
done
fi
if dpkg --compare-versions $version ge 7.1; then
for example in automerge post-7-0-schedule; do
run actions_verify_example $example
done
fi
if dpkg --compare-versions $version ge 8.0; then
for example in workflow-dispatch; do
run actions_verify_example $example
done
fi
if dpkg --compare-versions $version ge 9.0; then
run actions_verify_example schedule-noncancel
fi
if dpkg --compare-versions $version ge 14.0; then
run actions_verify_example matrix-dynamic
fi
if dpkg --compare-versions $version ge 15.0; then
run actions_verify_example workflow-call-expansion
run actions_verify_example id-tokens
fi
done
}

View file

@ -1,19 +1,24 @@
RUN_MODE = prod
WORK_PATH = ${WORK_PATH}
RUN_MODE = dev
WORK_PATH = forgejo-work-path
[server]
APP_DATA_PATH = ${WORK_PATH}/data
DOMAIN = ${IP}
HTTP_PORT = 3000
SSH_LISTEN_PORT = 2222
LFS_START_SERVER = true
[queue]
TYPE = immediate
[database]
DB_TYPE = sqlite3
PATH = ${WORK_PATH}/forgejo.db
[log]
MODE = file
LEVEL = debug
ROUTER = file
LEVEL = trace
logger.router.MODE = file
[log.file]
FILE_NAME = forgejo.log
@ -24,21 +29,7 @@ INSTALL_LOCK = true
[repository]
ENABLE_PUSH_CREATE_USER = true
DEFAULT_PUSH_CREATE_PRIVATE = false
DEFAULT_REPO_UNITS = repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects,repo.packages,repo.actions
[attachment]
PATH = relative-attachments
[lfs]
PATH = relative-lfs
[avatar]
PATH = relative-avatars
[repo-avatar]
PATH = relative-repo-avatars
[repo-archive]
PATH = relative-repo-archive
[packages]
PATH = relative-packages
[actions]
ENABLED = true

View file

@ -0,0 +1,47 @@
on: [push]
jobs:
upload-many:
runs-on: docker
steps:
- run: mkdir -p artifacts
- run: touch artifacts/ONE artifacts/TWO
- uses: https://data.forgejo.org/forgejo/upload-artifact@v4
with:
name: many-artifacts
path: artifacts/
download-many:
needs: [upload-many]
runs-on: docker
steps:
- uses: https://data.forgejo.org/forgejo/download-artifact@v4
- run: |
test -f many-artifacts/ONE
test -f many-artifacts/TWO
upload-one:
runs-on: docker
steps:
- run: mkdir -p path/to/artifact
- run: echo hello > path/to/artifact/world.txt
- uses: https://data.forgejo.org/forgejo/upload-artifact@v4
with:
name: my-artifact
path: path/to/artifact/world.txt
download-one:
needs: [upload-one]
runs-on: docker
steps:
- run: "! test -f world.txt"
- uses: https://data.forgejo.org/forgejo/download-artifact@v4
with:
name: my-artifact
- run: "test -f world.txt"

View file

@ -0,0 +1,13 @@
on:
pull_request:
jobs:
test:
runs-on: docker
container:
image: data.forgejo.org/oci/node:20-bookworm
options: "--volume /srv/example:/srv/example"
steps:
- run: |
${{ vars.SCRIPT }}

108
actions/example-automerge/run.sh Executable file
View file

@ -0,0 +1,108 @@
TMPDIR=$(mktemp -d)
trap "rm -fr $TMPDIR" EXIT
source $EXAMPLE_DIR/../../lib/lib.sh
api=$url/api/v1
repo=root/example-automerge
export d=/srv/example/automerge
function reset_automerge_pr() {
#
# repository with a pull_request event workflow that always succeeds
#
mkdir -p $d
forgejo-curl.sh api_json -X DELETE $api/repos/$repo >&/dev/null || true
forgejo-test-helper.sh push_workflow actions/example-$example $url root example-$example setup-forgejo $token
forgejo-curl.sh api_json -X DELETE $api/repos/$repo/actions/variables/SCRIPT >&/dev/null || true
forgejo-curl.sh api_json -X POST --data-raw '{"value":"true"}' $api/repos/$repo/actions/variables/SCRIPT
(
cd $d
rm -fr example-automerge
git clone $url/$repo
cd example-automerge
git checkout -b other
git config user.email root@example.com
git config user.name username
touch file-unique-to-the-pr-branch
echo other >>README
git add .
git commit -m 'other change'
git push --force -u origin other
)
#
# make sure the runner won't race with the sequence that follows
#
forgejo-runner.sh teardown
#
# create a PR and schedule it for automerge when the workflow succeeds
#
api_pr_delete_all $api $repo
forgejo-curl.sh api_json --data-raw '{"title":"PR title","base":"main","head":"other"}' $api/repos/$repo/pulls >$TMPDIR/pr.json
local pr=$(jq -r .number <$TMPDIR/pr.json)
forgejo-curl.sh api_json --data-raw '{"Do":"merge","merge_when_checks_succeed":true}' $api/repos/$repo/pulls/$pr/merge
if api_pr_is_merged $api $repo $pr; then
echo pull request already merged although it should not be
return 1
fi
}
function verify_automerge_on_status_success() {
reset_automerge_pr
local pr=$(jq -r .number <$TMPDIR/pr.json)
#
# run the workflow
#
forgejo-runner.sh run
local sha=$(api_branch_tip $api $repo other)
api_pr_wait_success $api $repo $sha
#
# verify the PR was automerged
#
if ! retry api_pr_is_merged $api $repo $pr; then
echo pull request is not automerged as expected
return 1
fi
}
function verify_automerge_on_reviewer_approval() {
reset_automerge_pr
local pr=$(jq -r .number <$TMPDIR/pr.json)
#
# require at least one review for a PR to be merged
#
api_branch_protect $api $repo main
#
# run the workflow
#
forgejo-runner.sh run
local sha=$(api_branch_tip $api $repo other)
api_pr_wait_success $api $repo $sha
#
# approve the PR
#
local username=user1
api_user_create $api $username $username@example.com
api_user_make_admin $api $username
user_login $username
DOT=$API_TMPDIR/$username api_pr_approve $api $repo $pr
#
# verify the PR was automerged
#
if ! retry api_pr_is_merged $api $repo $pr; then
echo pull request is not automerged as expected
return 1
fi
}
function main() {
verify_automerge_on_status_success
verify_automerge_on_reviewer_approval
}
main

View file

@ -0,0 +1 @@
mkdir -p /srv/example/automerge

View file

@ -0,0 +1,25 @@
on: [push]
jobs:
build:
runs-on: docker
container:
image: data.forgejo.org/oci/node:20-bookworm
steps:
- name: cache restore
id: cachestep
uses: https://data.forgejo.org/actions/cache/restore@v4
with:
path: |
/usr/local/bin/something
key: thecoolsecretcachekey
- name: verify something
run: |
set -x
test SOMETHING = $(cat /usr/local/bin/something)
- name: cache hit
run: |
set -x
test "${{ steps.cachestep.outputs.cache-hit }}" = true

View file

@ -0,0 +1,22 @@
source $EXAMPLE_DIR/../../lib/lib.sh
api=$url/api/v1
repostorer=root/example-cache-proxy-storer
repogetter=root/example-cache-proxy-getter
function main() {
forgejo-curl.sh api_json -X DELETE $api/repos/$repostorer >&/dev/null || true
forgejo-curl.sh api_json -X DELETE $api/repos/$repogetter >&/dev/null || true
forgejo-test-helper.sh push_workflow actions/example-$example/storer $url root example-$example-storer setup-forgejo $token
local shastorer=$(forgejo-test-helper.sh branch_tip $url $repostorer main)
forgejo-test-helper.sh wait_success $url $repostorer $shastorer
forgejo-test-helper.sh push_workflow actions/example-$example/getter $url root example-$example-getter setup-forgejo $token
local shagetter=$(forgejo-test-helper.sh branch_tip $url $repogetter main)
forgejo-test-helper.sh wait_failure $url $repogetter $shagetter
}
main

View file

@ -0,0 +1,29 @@
log:
level: debug
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels: ["docker:docker://code.forgejo.org/oci/node:20-bookworm"]
cache:
enabled: true
dir: "/srv/example/cache"
host: ""
port: 0
container:
network: "bridge"
privileged: false
options:
workdir_parent:
valid_volumes: ["/srv/example"]
docker_host: ""
host:
workdir_parent:

View file

@ -0,0 +1 @@
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload

View file

@ -0,0 +1,17 @@
on: [push]
jobs:
build:
runs-on: docker
container:
image: data.forgejo.org/oci/node:20-bookworm
steps:
- name: create something
run: echo SOMETHING > /usr/local/bin/something
- name: cache save
uses: https://data.forgejo.org/actions/cache/save@v4
with:
path: |
/usr/local/bin/something
key: thecoolsecretcachekey

View file

@ -0,0 +1 @@
forgejo-runner.sh reload

View file

@ -0,0 +1,96 @@
on:
pull_request:
types:
- opened
- closed
jobs:
save-cache:
runs-on: docker
container:
image: data.forgejo.org/oci/node:20-bookworm
steps:
- name: cache restore
id: cachestep1
uses: https://data.forgejo.org/actions/cache/restore@v4
with:
path: |
/usr/local/bin/something
key: cachekey-${{ forge.event.pull_request.head.repo.full_name }}
- name: cache hit
run: |
set -x
test "${{ steps.cachestep1.outputs.cache-hit }}" != true
- name: create something
run: echo SOMETHING > /usr/local/bin/something
- name: cache save
uses: https://data.forgejo.org/actions/cache/save@v4
with:
path: |
/usr/local/bin/something
key: ${{ steps.cachestep1.outputs.cache-primary-key }}
restore-cache:
runs-on: docker
needs: [save-cache]
container:
image: data.forgejo.org/oci/node:20-bookworm
steps:
- name: cache restore
id: cachestep2
uses: https://data.forgejo.org/actions/cache/restore@v4
with:
path: |
/usr/local/bin/something
key: cachekey-${{ forge.event.pull_request.head.repo.full_name }}
- name: verify something
run: |
set -x
test SOMETHING = $(cat /usr/local/bin/something)
- name: cache hit
run: |
set -x
test "${{ steps.cachestep2.outputs.cache-hit }}" = true
test:
runs-on: docker
needs: [restore-cache]
container:
image: data.forgejo.org/oci/node:20-bookworm
options: "--volume /srv/example:/srv/example"
steps:
- name: setup
shell: bash
run: |
set -x
test $FORGEJO_TOKEN = ${{ env.FORGEJO_TOKEN }}
test $FORGEJO_TOKEN = ${{ forge.token }}
export DEBIAN_FRONTEND=noninteractive ; apt-get -qq update ; apt-get install -y -qq curl git >& /dev/null
curl -sS -o /usr/local/bin/forgejo-curl.sh https://code.forgejo.org/forgejo/forgejo-curl/raw/branch/main/forgejo-curl.sh && chmod +x /usr/local/bin/forgejo-curl.sh
forgejo-curl.sh --token "$FORGEJO_TOKEN" login $FORGEJO_SERVER_URL
forgejo-curl.sh api_json $FORGEJO_SERVER_URL/api/v1/user
- name: determine if the PR is from a fork
id: forked
run: |
set -x
if test ${{ forge.event.pull_request.base.repo.full_name }} = ${{ forge.event.pull_request.head.repo.full_name }} ; then
echo value=false >> $FORGEJO_OUTPUT
else
echo value=true >> $FORGEJO_OUTPUT
fi
- name: save event
run: |
set -x
d=/srv/example/cache-pull-request/contexts/${{ forgejo.event.pull_request.head.repo.owner.username }}/$FORGEJO_EVENT_NAME
mkdir -p $d
cat > $d/forgejo-${{ forgejo.event.action }} <<'EOF'
${{ toJSON(forgejo) }}
EOF

View file

@ -0,0 +1,9 @@
#!/bin/bash
set -ex
c=$d/contexts
for user in cache-fork-org root; do
test -f $c/$user/pull_request/forgejo-closed
done

View file

@ -0,0 +1,9 @@
#!/bin/bash
set -ex
c=$d/contexts
for user in cache-fork-org root; do
test -f $c/$user/pull_request/forgejo-opened
done

View file

@ -0,0 +1,80 @@
TMPDIR=$(mktemp -d)
trap "rm -fr $TMPDIR" EXIT
api=$url/api/v1
export d=/srv/example/cache-pull-request
function main() {
mkdir -p $d
#
# open a pull request
# - from the same repository
# - from a forked repository
#
forgejo-test-helper.sh push_workflow actions/example-$example $url root example-$example setup-forgejo $token
forgejo-curl.sh api_json --data-raw '{"username":"cache-fork-org"}' $api/orgs
forgejo-curl.sh api_json --data-raw '{"organization":"cache-fork-org"}' $api/repos/root/example-cache-pull-request/forks
(
cd $d
git clone $url/cache-fork-org/example-cache-pull-request fork
cd fork
git config user.email root@example.com
git config user.name username
touch file-unique-to-the-pr-branch
git add .
git commit -m 'fork change'
git push
)
forgejo.sh retry forgejo-curl.sh api_json --data-raw '{"title":"PR from fork","base":"main","head":"cache-fork-org:main"}' $api/repos/root/example-cache-pull-request/pulls
(
cd $d
git clone $url/root/example-cache-pull-request
cd example-cache-pull-request
git checkout -b other
git config user.email root@example.com
git config user.name username
touch file-unique-to-the-forked-pr
git add .
git commit -m 'other change'
git push --force -u origin other
)
forgejo.sh retry forgejo-curl.sh api_json --data-raw '{"title":"PR same repo","base":"main","head":"other"}' $api/repos/root/example-cache-pull-request/pulls
export RETRY_DELAYS="10 20 60 60 60 60 60"
#
# wait for the opened event to succeed using the cache on all pull requests
#
if ! forgejo.sh retry $EXAMPLE_DIR/assert-contexts-opened.sh; then
echo "assert-contexts-opened.sh failed; printing related logs and information:"
find $d
sed -e 's/^/[RUNNER LOGS]/' <$FORGEJO_RUNNER_LOGS
return 1
fi
#
# merge all pull requests
#
forgejo-curl.sh api_json $api/repos/root/example-cache-pull-request/pulls | jq -r '.[] | .number' | while read pr; do
forgejo-curl.sh api_json --data-raw '{"Do":"merge"}' $api/repos/root/example-cache-pull-request/pulls/$pr/merge
done
#
# wait for the closed event to succeed using the cache on all pull requests
#
if ! forgejo.sh retry $EXAMPLE_DIR/assert-contexts-closed.sh; then
echo "assert-contexts-closed.sh failed; printing related logs and information:"
find $d
sed -e 's/^/[RUNNER LOGS]/' <$FORGEJO_RUNNER_LOGS
return 1
fi
}
main

View file

@ -0,0 +1,30 @@
log:
level: debug
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels: ["docker:docker://code.forgejo.org/oci/node:20-bookworm"]
cache:
enabled: true
dir: "/srv/example/cache"
host: ""
port: 0
container:
network: "bridge"
privileged: false
options:
workdir_parent:
valid_volumes: ["/srv/example"]
docker_host: ""
host:
workdir_parent:

View file

@ -0,0 +1,2 @@
mkdir -p /srv/example/cache-pull-request
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload

View file

@ -0,0 +1 @@
forgejo-runner.sh reload

View file

@ -0,0 +1,54 @@
on: [push]
jobs:
save-cache:
runs-on: docker
container:
image: data.forgejo.org/oci/node:20-bookworm
steps:
- name: cache restore
id: cachestep1
uses: https://data.forgejo.org/actions/cache/restore@v4
with:
path: |
/usr/local/bin/something
key: cachekey
- name: cache hit
run: |
set -x
test "${{ steps.cachestep1.outputs.cache-hit }}" != true
- name: create something
run: echo SOMETHING > /usr/local/bin/something
- name: cache save
uses: https://data.forgejo.org/actions/cache/save@v4
with:
path: |
/usr/local/bin/something
key: ${{ steps.cachestep1.outputs.cache-primary-key }}
restore-cache:
runs-on: docker
needs: [save-cache]
container:
image: data.forgejo.org/oci/node:20-bookworm
steps:
- name: cache restore
id: cachestep2
uses: https://data.forgejo.org/actions/cache/restore@v4
with:
path: |
/usr/local/bin/something
key: cachekey
- name: verify something
run: |
set -x
test SOMETHING = $(cat /usr/local/bin/something)
- name: cache hit
run: |
set -x
test "${{ steps.cachestep2.outputs.cache-hit }}" = true

View file

@ -0,0 +1,30 @@
log:
level: debug
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels: ["docker:docker://code.forgejo.org/oci/node:20-bookworm"]
cache:
enabled: true
dir: "/srv/example/cache"
host: ""
port: 0
container:
network: "bridge"
privileged: false
options:
workdir_parent:
valid_volumes: ["/srv/example"]
docker_host: ""
host:
workdir_parent:

1
actions/example-cache/setup.sh Executable file
View file

@ -0,0 +1 @@
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload

View file

@ -0,0 +1 @@
forgejo-runner.sh reload

View file

@ -0,0 +1,26 @@
on: [push]
jobs:
test:
runs-on: docker
container:
options: "--hostname customname"
steps:
- run: |
test -f /srv/example-config-options-volume-valid
- run: |
! test -w /srv/example-config-options-volume-valid
- run: |
! test -f /srv/example-config-options-volume-invalid
- run: |
set -x
test "$FROB" = "NITZ"
- run: |
set -x
test "$VAR_FROM_ENV_FILE" = "VALUE_FROM_ENV_FILE"
- run: |
set -x
test "$VAR_FROM_ENV_IN_CONFIG" = "VALUE_FROM_ENV_IN_CONFIG"
- run: |
set -x
test "$(cat /etc/hostname)" = customname

View file

@ -0,0 +1 @@
VAR_FROM_ENV_FILE=VALUE_FROM_ENV_FILE

View file

@ -0,0 +1,33 @@
log:
level: debug
job_level: debug
runner:
file: .runner
capacity: 1
envs:
VAR_FROM_ENV_IN_CONFIG: VALUE_FROM_ENV_IN_CONFIG
env_file: env_file
timeout: 3h
insecure: true
fetch_timeout: 5s
fetch_interval: 2s
labels: ["docker:docker://code.forgejo.org/oci/node:20-bookworm"]
cache:
enabled: false
dir: ""
host: ""
port: 0
container:
network: ""
privileged: false
options: "--volume /srv/example-config-options-volume-valid:/srv/example-config-options-volume-valid:ro --volume /srv/example-config-options-volume-invalid:/srv/example-config-options-volume-invalid --env FROB=NITZ"
workdir_parent:
valid_volumes: ["/srv/example-config-options-volume-valid"]
docker_host: ""
host:
workdir_parent:

View file

@ -0,0 +1,6 @@
>/srv/example-config-options-volume-valid
>/srv/example-config-options-volume-invalid
TMPDIR=$(mktemp -d)
cp $EXAMPLE_DIR/runner-config.yaml $EXAMPLE_DIR/env_file $TMPDIR
sed -i -e "s|env_file:.*|env_file: $TMPDIR/env_file|" $TMPDIR/runner-config.yaml
FORGEJO_RUNNER_CONFIG=$TMPDIR/runner-config.yaml forgejo-runner.sh reload

View file

@ -0,0 +1 @@
forgejo-runner.sh reload

View file

@ -3,6 +3,6 @@ jobs:
test:
runs-on: docker
container:
image: alpine:3.19
image: data.forgejo.org/oci/alpine:3.23
steps:
- run: grep Alpine /etc/os-release

View file

@ -4,7 +4,7 @@ jobs:
test:
runs-on: docker
container:
image: code.forgejo.org/oci/node:20-bookworm
image: data.forgejo.org/oci/node:20-bookworm
volumes:
- /srv/example:/srv/example
steps:
@ -15,174 +15,240 @@ jobs:
test "$CI" = true
test "$CI" = "${{ env.CI }}"
- name: GITHUB_ACTION
- name: FORGEJO_ACTION
run: |
set -x
echo "$GITHUB_ACTION" | grep -E '^[0-9]+$'
test "$GITHUB_ACTION" = "${{ env.GITHUB_ACTION }}"
test "$GITHUB_ACTION" = "${{ github.ACTION }}"
echo "$FORGEJO_ACTION" | grep -E '^[0-9]+$'
test "$FORGEJO_ACTION" = "${{ env.FORGEJO_ACTION }}"
test "$FORGEJO_ACTION" = "${{ github.ACTION }}"
test "$FORGEJO_ACTION" = "${{ forge.ACTION }}"
test "$FORGEJO_ACTION" = "${{ forgejo.ACTION }}"
test "$FORGEJO_ACTION" = "$GITHUB_ACTION"
# See also actions/example-local-action/.forgejo/local-action/action.yml
- name: GITHUB_ACTION_PATH
- name: FORGEJO_ACTION_PATH
run: |
set -x
test -z "$GITHUB_ACTION_PATH"
test "$GITHUB_ACTION_PATH" = "${{ env.GITHUB_ACTION_PATH }}"
test "$GITHUB_ACTION_PATH" = "${{ github.ACTION_PATH }}"
test -z "$FORGEJO_ACTION_PATH"
test "$FORGEJO_ACTION_PATH" = "${{ env.FORGEJO_ACTION_PATH }}"
test "$FORGEJO_ACTION_PATH" = "${{ github.ACTION_PATH }}"
test "$FORGEJO_ACTION_PATH" = "${{ forge.ACTION_PATH }}"
test "$FORGEJO_ACTION_PATH" = "${{ forgejo.ACTION_PATH }}"
test "$FORGEJO_ACTION_PATH" = "$GITHUB_ACTION_PATH"
- name: when running an action
if: ${{ env.GITHUB_ACTIONS }}
if: ${{ env.FORGEJO_ACTIONS }}
uses: SELF@main
with:
input-one: "otherone"
- name: GITHUB_ACTION_REPOSITORY
run: test -f /srv/example/example-context/GITHUB_ACTION_REPOSITORY
- name: FORGEJO_ACTION_REPOSITORY
run: test -f /srv/example/example-context/FORGEJO_ACTION_REPOSITORY
- name: GITHUB_ACTION_PATH
run: test -f /srv/example/example-context/GITHUB_ACTION_PATH
- name: FORGEJO_ACTION_PATH
run: test -f /srv/example/example-context/FORGEJO_ACTION_PATH
- name: GITHUB_ACTIONS
- name: FORGEJO_ACTIONS
run: |
set -x
test "$GITHUB_ACTIONS" = true
test "$GITHUB_ACTIONS" = "${{ env.GITHUB_ACTIONS }}"
test "$FORGEJO_ACTIONS" = true
test "$FORGEJO_ACTIONS" = "${{ env.FORGEJO_ACTIONS }}"
test "$FORGEJO_ACTIONS" = "$GITHUB_ACTIONS"
- name: GITHUB_ACTOR
- name: FORGEJO_ACTOR
run: |
set -x
test "$GITHUB_ACTOR"
test "$GITHUB_ACTOR" = "${{ env.GITHUB_ACTOR }}"
test "$GITHUB_ACTOR" = "${{ github.ACTOR }}"
test "$FORGEJO_ACTOR"
test "$FORGEJO_ACTOR" = "${{ env.FORGEJO_ACTOR }}"
test "$FORGEJO_ACTOR" = "${{ github.ACTOR }}"
test "$FORGEJO_ACTOR" = "${{ forge.ACTOR }}"
test "$FORGEJO_ACTOR" = "${{ forgejo.ACTOR }}"
test "$FORGEJO_ACTOR" = "$GITHUB_ACTOR"
- name: GITHUB_API_URL
- name: FORGEJO_API_URL
shell: bash
run: |
set -x
[[ "$GITHUB_API_URL" =~ /api/v1$ ]]
test "$GITHUB_API_URL" = "${{ env.GITHUB_API_URL }}"
test "$GITHUB_API_URL" = "${{ github.API_URL }}"
[[ "$FORGEJO_API_URL" =~ /api/v1$ ]]
test "$FORGEJO_API_URL" = "${{ env.FORGEJO_API_URL }}"
test "$FORGEJO_API_URL" = "${{ github.API_URL }}"
test "$FORGEJO_API_URL" = "${{ forge.API_URL }}"
test "$FORGEJO_API_URL" = "${{ forgejo.API_URL }}"
test "$FORGEJO_API_URL" = "$GITHUB_API_URL"
# See also actions/example-pull-request/.forgejo/workflows/test.yml
- name: GITHUB_BASE_REF
- name: FORGEJO_BASE_REF
run: |
set -x
test -z "$GITHUB_BASE_REF"
test "$GITHUB_BASE_REF" = "${{ env.GITHUB_BASE_REF }}"
test "$GITHUB_BASE_REF" = "${{ github.BASE_REF }}"
test -z "$FORGEJO_BASE_REF"
test "$FORGEJO_BASE_REF" = "${{ env.FORGEJO_BASE_REF }}"
test "$FORGEJO_BASE_REF" = "${{ github.BASE_REF }}"
test "$FORGEJO_BASE_REF" = "${{ forge.BASE_REF }}"
test "$FORGEJO_BASE_REF" = "${{ forgejo.BASE_REF }}"
test "$FORGEJO_BASE_REF" = "$GITHUB_BASE_REF"
# See also actions/example-pull-request/.forgejo/workflows/test.yml
- name: GITHUB_HEAD_REF
- name: FORGEJO_HEAD_REF
run: |
set -x
test -z "$GITHUB_HEAD_REF"
test "$GITHUB_HEAD_REF" = "${{ env.GITHUB_HEAD_REF }}"
test "$GITHUB_HEAD_REF" = "${{ github.HEAD_REF }}"
test -z "$FORGEJO_HEAD_REF"
test "$FORGEJO_HEAD_REF" = "${{ env.FORGEJO_HEAD_REF }}"
test "$FORGEJO_HEAD_REF" = "${{ github.HEAD_REF }}"
test "$FORGEJO_HEAD_REF" = "${{ forge.HEAD_REF }}"
test "$FORGEJO_HEAD_REF" = "${{ forgejo.HEAD_REF }}"
test "$FORGEJO_HEAD_REF" = "$GITHUB_HEAD_REF"
- name: GITHUB_ENV
- name: FORGEJO_ENV
run: |
set -x
test -f "$GITHUB_ENV"
test "$GITHUB_ENV" = "${{ env.GITHUB_ENV }}"
test -f "$FORGEJO_ENV"
test "$FORGEJO_ENV" = "${{ env.FORGEJO_ENV }}"
test "$FORGEJO_ENV" = "$GITHUB_ENV"
- name: GITHUB_EVENT_NAME
- name: FORGEJO_EVENT_NAME
run: |
set -x
test "$GITHUB_EVENT_NAME" = push
test "$GITHUB_EVENT_NAME" = "${{ env.GITHUB_EVENT_NAME }}"
test "$GITHUB_EVENT_NAME" = "${{ github.EVENT_NAME }}"
test "$FORGEJO_EVENT_NAME" = push
test "$FORGEJO_EVENT_NAME" = "${{ env.FORGEJO_EVENT_NAME }}"
test "$FORGEJO_EVENT_NAME" = "${{ github.EVENT_NAME }}"
test "$FORGEJO_EVENT_NAME" = "${{ forge.EVENT_NAME }}"
test "$FORGEJO_EVENT_NAME" = "${{ forgejo.EVENT_NAME }}"
test "$FORGEJO_EVENT_NAME" = "$GITHUB_EVENT_NAME"
- name: GITHUB_JOB
- name: FORGEJO_JOB
run: |
set -x
test "$GITHUB_JOB" = test
test "$GITHUB_JOB" = "${{ env.GITHUB_JOB }}"
test "$GITHUB_JOB" = "${{ github.JOB }}"
test "$FORGEJO_JOB" = test
test "$FORGEJO_JOB" = "${{ env.FORGEJO_JOB }}"
test "$FORGEJO_JOB" = "${{ github.JOB }}"
test "$FORGEJO_JOB" = "${{ forge.JOB }}"
test "$FORGEJO_JOB" = "${{ forgejo.JOB }}"
test "$FORGEJO_JOB" = "$GITHUB_JOB"
- name: GITHUB_OUTPUT
- name: FORGEJO_OUTPUT
run: |
set -x
test -f "$GITHUB_OUTPUT"
test "$GITHUB_OUTPUT" = "${{ env.GITHUB_OUTPUT }}"
test -f "$FORGEJO_OUTPUT"
test "$FORGEJO_OUTPUT" = "${{ env.FORGEJO_OUTPUT }}"
test "$FORGEJO_OUTPUT" = "$GITHUB_OUTPUT"
- name: GITHUB_PATH
- name: FORGEJO_PATH
run: |
set -x
test -f "$GITHUB_PATH"
test "$GITHUB_PATH" = "${{ env.GITHUB_PATH }}"
test -f "$FORGEJO_PATH"
test "$FORGEJO_PATH" = "${{ env.FORGEJO_PATH }}"
test "$FORGEJO_PATH" = "$GITHUB_PATH"
- name: GITHUB_REF
- name: FORGEJO_REF
shell: bash
run: |
set -x
[[ "$GITHUB_REF" =~ ^refs/ ]]
test "$GITHUB_REF" = "${{ env.GITHUB_REF }}"
test "$GITHUB_REF" = "${{ github.REF }}"
[[ "$FORGEJO_REF" =~ ^refs/ ]]
test "$FORGEJO_REF" = "${{ env.FORGEJO_REF }}"
test "$FORGEJO_REF" = "${{ github.REF }}"
test "$FORGEJO_REF" = "${{ forge.REF }}"
test "$FORGEJO_REF" = "${{ forgejo.REF }}"
test "$FORGEJO_REF" = "$GITHUB_REF"
- name: GITHUB_REF_NAME
- name: FORGEJO_REF_NAME
shell: bash
run: |
set -x
! [[ "$GITHUB_REF_NAME" =~ ^refs/ ]]
test "$GITHUB_REF_NAME" = "${{ env.GITHUB_REF_NAME }}"
test "$GITHUB_REF_NAME" = "${{ github.REF_NAME }}"
! [[ "$FORGEJO_REF_NAME" =~ ^refs/ ]]
test "$FORGEJO_REF_NAME" = "${{ env.FORGEJO_REF_NAME }}"
test "$FORGEJO_REF_NAME" = "${{ github.REF_NAME }}"
test "$FORGEJO_REF_NAME" = "${{ forge.REF_NAME }}"
test "$FORGEJO_REF_NAME" = "${{ forgejo.REF_NAME }}"
test "$FORGEJO_REF_NAME" = "$GITHUB_REF_NAME"
- name: GITHUB_REPOSITORY
- name: FORGEJO_REPOSITORY
run: |
set -x
test "$GITHUB_REPOSITORY" = root/example-context
test "$GITHUB_REPOSITORY" = "${{ env.GITHUB_REPOSITORY }}"
test "$GITHUB_REPOSITORY" = "${{ github.REPOSITORY }}"
test "$FORGEJO_REPOSITORY" = root/example-context
test "$FORGEJO_REPOSITORY" = "${{ env.FORGEJO_REPOSITORY }}"
test "$FORGEJO_REPOSITORY" = "${{ github.REPOSITORY }}"
test "$FORGEJO_REPOSITORY" = "${{ forge.REPOSITORY }}"
test "$FORGEJO_REPOSITORY" = "${{ forgejo.REPOSITORY }}"
test "$FORGEJO_REPOSITORY" = "$GITHUB_REPOSITORY"
- name: GITHUB_REPOSITORY_OWNER
- name: FORGEJO_REPOSITORY_OWNER
run: |
set -x
test "$GITHUB_REPOSITORY_OWNER" = root
test "$GITHUB_REPOSITORY_OWNER" = "${{ env.GITHUB_REPOSITORY_OWNER }}"
test "$GITHUB_REPOSITORY_OWNER" = "${{ github.REPOSITORY_OWNER }}"
test "$FORGEJO_REPOSITORY_OWNER" = root
test "$FORGEJO_REPOSITORY_OWNER" = "${{ env.FORGEJO_REPOSITORY_OWNER }}"
test "$FORGEJO_REPOSITORY_OWNER" = "${{ github.REPOSITORY_OWNER }}"
test "$FORGEJO_REPOSITORY_OWNER" = "${{ forge.REPOSITORY_OWNER }}"
test "$FORGEJO_REPOSITORY_OWNER" = "${{ forgejo.REPOSITORY_OWNER }}"
test "$FORGEJO_REPOSITORY_OWNER" = "$GITHUB_REPOSITORY_OWNER"
- name: GITHUB_RUN_NUMBER
- name: FORGEJO_RUN_NUMBER
run: |
set -x
echo "$GITHUB_RUN_NUMBER" | grep -E '^[0-9]+$'
test "$GITHUB_RUN_NUMBER" = "${{ env.GITHUB_RUN_NUMBER }}"
test "$GITHUB_RUN_NUMBER" = "${{ github.RUN_NUMBER }}"
echo "$FORGEJO_RUN_NUMBER" | grep -E '^[0-9]+$'
test "$FORGEJO_RUN_NUMBER" = "${{ env.FORGEJO_RUN_NUMBER }}"
test "$FORGEJO_RUN_NUMBER" = "${{ github.RUN_NUMBER }}"
test "$FORGEJO_RUN_NUMBER" = "${{ forge.RUN_NUMBER }}"
test "$FORGEJO_RUN_NUMBER" = "${{ forgejo.RUN_NUMBER }}"
test "$FORGEJO_RUN_NUMBER" = "$GITHUB_RUN_NUMBER"
- name: GITHUB_SERVER_URL
- name: FORGEJO_RUN_ID
run: |
set -x
echo "$FORGEJO_RUN_ID" | grep -E '^[0-9]+$'
test "$FORGEJO_RUN_ID" = "${{ env.FORGEJO_RUN_ID }}"
test "$FORGEJO_RUN_ID" = "${{ github.RUN_ID }}"
test "$FORGEJO_RUN_ID" = "${{ forge.RUN_ID }}"
test "$FORGEJO_RUN_ID" = "${{ forgejo.RUN_ID }}"
test "$FORGEJO_RUN_ID" = "$GITHUB_RUN_ID"
- name: FORGEJO_SERVER_URL
shell: bash
run: |
set -x
[[ "$GITHUB_SERVER_URL" =~ ^http ]]
test "$GITHUB_SERVER_URL" = "${{ env.GITHUB_SERVER_URL }}"
test "$GITHUB_SERVER_URL" = "${{ github.SERVER_URL }}"
[[ "$FORGEJO_SERVER_URL" =~ ^http ]]
test "$FORGEJO_SERVER_URL" = "${{ env.FORGEJO_SERVER_URL }}"
test "$FORGEJO_SERVER_URL" = "${{ github.SERVER_URL }}"
test "$FORGEJO_SERVER_URL" = "${{ forge.SERVER_URL }}"
test "$FORGEJO_SERVER_URL" = "${{ forgejo.SERVER_URL }}"
test "$FORGEJO_SERVER_URL" = "$GITHUB_SERVER_URL"
- name: GITHUB_SHA
- name: FORGEJO_SHA
run: |
set -x
test "$GITHUB_SHA"
test "$GITHUB_SHA" = "${{ env.GITHUB_SHA }}"
test "$GITHUB_SHA" = "${{ github.SHA }}"
test "$FORGEJO_SHA"
test "$FORGEJO_SHA" = "${{ env.FORGEJO_SHA }}"
test "$FORGEJO_SHA" = "${{ github.SHA }}"
test "$FORGEJO_SHA" = "${{ forge.SHA }}"
test "$FORGEJO_SHA" = "${{ forgejo.SHA }}"
test "$FORGEJO_SHA" = "$GITHUB_SHA"
- name: GITHUB_STEP_SUMMARY
- name: FORGEJO_STEP_SUMMARY
run: |
set -x
test -f "$GITHUB_STEP_SUMMARY"
test "$GITHUB_STEP_SUMMARY" = "${{ env.GITHUB_STEP_SUMMARY }}"
test -f "$FORGEJO_STEP_SUMMARY"
test "$FORGEJO_STEP_SUMMARY" = "${{ env.FORGEJO_STEP_SUMMARY }}"
test "$FORGEJO_STEP_SUMMARY" = "$GITHUB_STEP_SUMMARY"
# See also actions/example-pull-request/.forgejo/workflows/test.yml
- name: GITHUB_TOKEN
- name: FORGEJO_TOKEN
run: |
set -x
test "$GITHUB_TOKEN"
test "$GITHUB_TOKEN" = "${{ env.GITHUB_TOKEN }}"
test "$GITHUB_TOKEN" = "${{ github.TOKEN }}"
test "$FORGEJO_TOKEN"
test "$FORGEJO_TOKEN" = "${{ env.FORGEJO_TOKEN }}"
test "$FORGEJO_TOKEN" = "${{ github.TOKEN }}"
test "$FORGEJO_TOKEN" = "${{ forge.TOKEN }}"
test "$FORGEJO_TOKEN" = "${{ forgejo.TOKEN }}"
test "$FORGEJO_TOKEN" = "$GITHUB_TOKEN"
- name: GITHUB_WORKSPACE
- name: FORGEJO_WORKSPACE
run: |
set -x
test -d "$GITHUB_WORKSPACE"
test "$GITHUB_WORKSPACE" = "${{ env.GITHUB_WORKSPACE }}"
test "$GITHUB_WORKSPACE" = "${{ github.WORKSPACE }}"
test -d "$FORGEJO_WORKSPACE"
test "$FORGEJO_WORKSPACE" = "${{ env.FORGEJO_WORKSPACE }}"
test "$FORGEJO_WORKSPACE" = "${{ github.WORKSPACE }}"
test "$FORGEJO_WORKSPACE" = "${{ forge.WORKSPACE }}"
test "$FORGEJO_WORKSPACE" = "${{ forgejo.WORKSPACE }}"
test "$FORGEJO_WORKSPACE" = "$GITHUB_WORKSPACE"
- name: RUNNER_ARCH
run: |
@ -194,11 +260,10 @@ jobs:
set -x
test "$RUNNER_OS" = Linux
# runner 3.3.0 $RUNNER_TOOL_CACHE is not an existing directory
# - name: RUNNER_TOOL_CACHE
# run: |
# set -x
# test -d "$RUNNER_TOOL_CACHE"
- name: RUNNER_TOOL_CACHE
run: |
set -x
test "$RUNNER_TOOL_CACHE"
- name: RUNNER_TEMP
run: |

View file

@ -6,18 +6,27 @@ inputs:
runs:
using: "composite"
steps:
- name: GITHUB_ACTION_REPOSITORY
- name: FORGEJO_ACTION_REPOSITORY
run: |
set -x
test "$GITHUB_ACTION_REPOSITORY" = root/action-for-context
test "$GITHUB_ACTION_REPOSITORY" = "${{ env.GITHUB_ACTION_REPOSITORY }}"
test "$GITHUB_ACTION_REPOSITORY" = "${{ github.ACTION_REPOSITORY }}"
touch /srv/example/example-context/GITHUB_ACTION_REPOSITORY
test "$FORGEJO_ACTION_REPOSITORY" = root/action-for-context
test "$FORGEJO_ACTION_REPOSITORY" = "${{ env.FORGEJO_ACTION_REPOSITORY }}"
test "$FORGEJO_ACTION_REPOSITORY" = "${{ github.ACTION_REPOSITORY }}"
test "$FORGEJO_ACTION_REPOSITORY" = "${{ forge.ACTION_REPOSITORY }}"
test "$FORGEJO_ACTION_REPOSITORY" = "${{ forgejo.ACTION_REPOSITORY }}"
test "$FORGEJO_ACTION_REPOSITORY" = "$GITHUB_ACTION_REPOSITORY"
touch /srv/example/example-context/FORGEJO_ACTION_REPOSITORY
- name: GITHUB_ACTION_PATH
- name: FORGEJO_ACTION_PATH
shell: bash
run: |
set -x
[[ "$GITHUB_ACTION_PATH" =~ action-for-context@main$ ]]
test "$GITHUB_ACTION_PATH" = "${{ github.ACTION_PATH }}"
touch /srv/example/example-context/GITHUB_ACTION_PATH
# prior to Forgejo runner 8.0.0 the action path is built out of the file path.
# with Forgejo runner 8.0.0 and above is it a 64 character hash string
# e.g. /var/run/act/actions/1b/5c1802fa47e35716c2a0977bc907049d31aef29191cba400011c0b38b52d12
[[ "$FORGEJO_ACTION_PATH" =~ action-for-context@main$ ]] || [[ "$FORGEJO_ACTION_PATH" =~ /[0-9a-f]{2}/[0-9a-f]{62}$ ]]
test "$FORGEJO_ACTION_PATH" = "${{ github.ACTION_PATH }}"
test "$FORGEJO_ACTION_PATH" = "${{ forge.ACTION_PATH }}"
test "$FORGEJO_ACTION_PATH" = "${{ forgejo.ACTION_PATH }}"
test "$FORGEJO_ACTION_PATH" = "$GITHUB_ACTION_PATH"
touch /srv/example/example-context/FORGEJO_ACTION_PATH

View file

@ -0,0 +1,9 @@
on:
push:
jobs:
test:
runs-on: create-runner-file
steps:
- run: |
echo "OK"

View file

@ -0,0 +1,40 @@
source "lib/lib.sh"
api="$url/api/v1"
function main() {
local repo
repo="root/example-$example"
secret="$(openssl rand -hex 20)"
runner_name="runner-$(openssl rand -hex 5)"
create_offline_registration_token "$runner_name" root "$secret"
# Changing to $DIR is necessary so that `.runner` gets created there. Otherwise, `forgejo-runner` would not pick it up.
pushd "$DIR" || exit 1
./forgejo-runner -c "$EXAMPLE_DIR/runner-config.yaml" create-runner-file --instance "http://$IP:3000" --name "$runner_name" --secret "$secret" --connect
popd || exit 1
FORGEJO_RUNNER_CONFIG="$EXAMPLE_DIR/runner-config.yaml" forgejo-runner.sh reload
label_count=$(jq '.labels | length ' "$DIR/.runner")
if [[ "$label_count" != "1" ]] ; then
echo "Unexpected number of labels in .runner file: $label_count instead of 1" >&2
exit 1
fi
runner_label=$(jq -r '.labels[0]' "$DIR/.runner")
if [[ "$runner_label" != "create-runner-file:docker://code.forgejo.org/oci/node:24-trixie" ]] ; then
echo "Unexpected runner label: '$runner_label' instead of create-runner-file:docker://code.forgejo.org/oci/node:24-trixie" >&2
exit 1
fi
forgejo-test-helper.sh push_workflow "actions/example-$example" "$url" root "example-$example" setup-forgejo "$token"
local sha
sha="$(forgejo-test-helper.sh branch_tip "$url" "$repo" main)"
forgejo-test-helper.sh wait_success "$url" "$repo" "$sha"
}
main

View file

@ -0,0 +1,31 @@
log:
level: debug
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels:
- "create-runner-file:docker://code.forgejo.org/oci/node:24-trixie"
cache:
enabled: true
dir: "/srv/example/cache"
host: ""
port: 0
container:
network: "bridge"
privileged: false
options:
workdir_parent:
valid_volumes: ["/srv/example"]
docker_host: ""
host:
workdir_parent:

View file

@ -6,17 +6,17 @@ jobs:
test:
runs-on: docker
container:
image: code.forgejo.org/oci/debian:bookworm
image: data.forgejo.org/oci/debian:trixie
options: "--volume /srv/example:/srv/example"
steps:
- run: |
touch /srv/example/cron-volume/DONE
- name: save context
run: |
d=/srv/example/cron/contexts/$GITHUB_EVENT_NAME
d=/srv/example/cron/contexts/$FORGEJO_EVENT_NAME
mkdir -p $d
cat > $d/github <<'EOF'
${{ toJSON(github) }}
EOF
- run: |
touch /srv/example/cron-volume/DONE

View file

@ -7,7 +7,7 @@ forgejo-test-helper.sh push_workflow actions/example-$example $url root example-
# See https://codeberg.org/forgejo/forgejo/pulls/1941 for more information
#
function verify_ref() {
local ref=$(sqlite3 $DIR/forgejo-work-path/forgejo.db 'select ref from action_schedule')
local ref=$(sqlite3 $DIR/forgejo-work-path/forgejo.db 'select ref from action_schedule')
test "${ref##*/}" = "main"
}
verify_ref
@ -16,12 +16,12 @@ forgejo-curl.sh api_json --data '{"new_branch_name":"zzzz"}' $api/repos/root/exa
verify_ref
# cron runs once per minute, give it three minutes max before declaring failure
if ! RETRY_DELAYS="30 30 30 30 30 30" forgejo.sh retry test -f /srv/example/cron-volume/DONE ; then
if ! RETRY_DELAYS="30 30 30 30 30 30" forgejo.sh retry test -f /srv/example/cron-volume/DONE; then
cat $FORGEJO_RUNNER_LOGS
false
fi
c=/srv/example/cron/contexts/schedule/github
cat $c
test "schedule" = "$(jq -r .event_name < $c)"
test "schedule" = "$(jq -r .event.action < $c)"
test "schedule" = "$(jq -r .event_name <$c)"
test "schedule" = "$(jq -r .event.action <$c)"

View file

@ -9,11 +9,11 @@ jobs:
#
- uses: https://code.forgejo.org/forgejo/test-setup-forgejo-docker@main
with:
args: ${{ github.workspace }}/SOMEFILE
args: ${{ forgejo.workspace }}/SOMEFILE
#
# ... which then also exists in the job workspace
# because both docker containers are automatically
# sharing the volume that contains it.
#
- run: |
test -f ${{ github.workspace }}/SOMEFILE
test -f ${{ forgejo.workspace }}/SOMEFILE

View file

@ -23,7 +23,7 @@ jobs:
if: ${{ env.KEY1 == 'nogood' }}
- name: if does not skip
id: conditional
run: echo 'check=good' >> $GITHUB_OUTPUT
run: echo 'check=good' >> $FORGEJO_OUTPUT
if: env.KEY1 == 'value1'
- name: verify if did not skip
run: test ${{ steps.conditional.outputs.check }} = good
@ -98,10 +98,11 @@ jobs:
set -x
test "${{ fromJSON('["one","two"]')[0] }}" = 'one'
# As of act v1.13.0 this fails for real (before it pretended to work but did not)
# - name: hashFiles
# run: |
# set -x
# hash="bd52020371c038c4ad38a8d2df05dfa1a220d40fbe1ae83b63d6010cb527e531"
# test "${{ hashFiles('actions/example-expression/.forgejo/fileone.txt') }}" = $hash
# test "${{ hashFiles('actions/example-expression/.forgejo/fileone.*') }}" = $hash
- uses: actions/checkout@v4
- name: hashFiles
run: |
set -x
hash="aea6ca2329c852f5b480ec35e1fe09d39a6bd1b50f4f9cc38fbd4fef870dc107"
test "${{ hashFiles('.forgejo/fileone.txt') }}" = $hash
test "${{ hashFiles('.forgejo/fileone.*') }}" = $hash

View file

@ -0,0 +1,11 @@
on: [push]
jobs:
ls:
runs-on: docker
steps:
- uses: https://code.forgejo.org/forgejo/test-setup-forgejo-docker@main
with:
args: ${{ forgejo.workspace }}/SOMEFILE
- run: |
test -f ${{ forgejo.workspace }}/SOMEFILE

View file

@ -0,0 +1,69 @@
TMPDIR=$(mktemp -d)
trap "rm -fr $TMPDIR" EXIT
function setup_with_rebuild() {
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config-with-rebuild.yml forgejo-runner.sh reload
}
function setup_without_rebuild() {
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config-without-rebuild.yml forgejo-runner.sh reload
}
function run() {
local dir="$1"
local expected="$2"
local repo=root/example-$example
forgejo-test-helper.sh push_workflow $dir $url root example-$example setup-forgejo $token
sha=$(forgejo-test-helper.sh branch_tip $url $repo main)
forgejo-test-helper.sh wait_$expected $url $repo $sha
}
function get_remote_image() {
docker image ls --format='{{ .Repository }}' | grep '^runner-remote-docker-action'
}
function remove_remote_images() {
docker image ls --format='{{ .Repository }}' | grep '^runner-remote-docker-action' | while read image; do
docker rmi $image
done
}
function was_built() {
grep --quiet 'docker build -t runner-remote-docker-action' $FORGEJO_RUNNER_LOGS
}
function main() {
local dir=$TMPDIR/repository
cp -a $EXAMPLE_DIR $dir
remove_remote_images
:
: Run one
:
setup_without_rebuild
run $dir success
local image="$(get_remote_image)"
test "$image"
was_built
:
: Run two: verify the image was not rebuilt
:
setup_without_rebuild # resets the logs
run $dir success
test "$image" = "$(get_remote_image)"
! was_built
:
: Run two: verify the image was rebuilt and
: the image name stayed the same
:
setup_with_rebuild
run $dir success
test "$image" = "$(get_remote_image)"
was_built
}
main

View file

@ -0,0 +1,31 @@
log:
level: trace
job_level: trace
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels: ["docker:docker://code.forgejo.org/oci/node:20-bookworm"]
cache:
enabled: false
dir: ""
host: ""
port: 0
container:
network: "bridge"
privileged: false
options:
workdir_parent:
valid_volumes: ["/srv/example"]
docker_host: ""
force_rebuild: true
host:
workdir_parent:

View file

@ -0,0 +1,31 @@
log:
level: trace
job_level: trace
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels: ["docker:docker://code.forgejo.org/oci/node:20-bookworm"]
cache:
enabled: false
dir: ""
host: ""
port: 0
container:
network: "bridge"
privileged: false
options:
workdir_parent:
valid_volumes: ["/srv/example"]
docker_host: ""
force_rebuild: false
host:
workdir_parent:

View file

@ -0,0 +1 @@
forgejo-runner.sh reload

View file

@ -0,0 +1,78 @@
on: [push]
env:
JWT_CLI_VERSION: 6.2.0 # renovate: datasource=github-releases depName=jwt-cli packageName=mike-engel/jwt-cli
jobs:
generation-allowed:
enable-openid-connect: true
runs-on: docker
container:
image: data.forgejo.org/oci/ci:1
steps:
- run: curl -L -o jwt-linux.tar.gz https://github.com/mike-engel/jwt-cli/releases/download/${{ env.JWT_CLI_VERSION }}/jwt-linux-musl.tar.gz && tar -xvzf ./jwt-linux.tar.gz && chmod a+x ./jwt
- name: validate token generation works
run: |
RAW_JWT=$(curl -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=exampleAudience" | jq -r ".value")
if [[ -z "RAW_JWT" ]]; then
echo "Error: RAW_JWT should be set"
exit 1
fi
DECODED_JWT_BODY=$(echo $RAW_JWT | jq -R 'split(".") | .[1] | @base64d | fromjson')
if [[ -z "$DECODED_JWT_BODY" ]]; then
echo "Error: DECODED_JWT_BODY should be set"
exit 1
fi
ISS=$(echo $DECODED_JWT_BODY | jq -r '.iss')
if [[ -z "$ISS" ]]; then
echo "Error: ISS should be set"
exit 1
fi
curl "$ISS/.well-known/keys" > jwks.json
JWKS=$(cat ./jwks.json)
if [[ -z "$JWKS" ]]; then
echo "Error: JWKS should be set"
exit 1
fi
# Verify that the JWT decodes with the JWKS data
./jwt decode -S @./jwks.json -A RS256 $RAW_JWT || (echo "Error: failed signature validation" && exit 1)
WORKFLOW=$(echo $DECODED_JWT_BODY | jq -r '.workflow')
AUD=$(echo $DECODED_JWT_BODY | jq -r '.aud')
EVENT_NAME=$(echo $DECODED_JWT_BODY | jq -r '.event_name')
SUB=$(echo $DECODED_JWT_BODY | jq -r '.sub')
if [[ "$WORKFLOW" != "test.yml" ]]; then
echo "Error: WORKFLOW should be test.yml but is $WORKFLOW"
exit 1
fi
if [[ "$AUD" != "exampleAudience" ]]; then
echo "Error: AUD should be exampleAudience but is $AUD"
exit 1
fi
if [[ "$EVENT_NAME" != "push" ]]; then
echo "Error: EVENT_NAME should be push but is $EVENT_NAME"
exit 1
fi
if [[ "$SUB" != "repo:root/example-id-tokens:ref:refs/heads/main" ]]; then
echo "Error: SUB should be repo:root/example-id-tokens:ref:refs/heads/main but is $SUB"
exit 1
fi
generation-not-allowed:
enable-openid-connect: false
runs-on: docker
steps:
- name: check variables are unset
run: |
if [[ -n "$ACTIONS_ID_TOKEN_REQUEST_TOKEN" ]]; then
echo "Error: ACTIONS_ID_TOKEN_REQUEST_TOKEN should be unset"
exit 1
fi
if [[ -n "$ACTIONS_ID_TOKEN_REQUEST_URL" ]]; then
echo "Error: ACTIONS_ID_TOKEN_REQUEST_TOKEN should be unset"
exit 1
fi

View file

@ -1,9 +1,3 @@
#
# As of Forgejo v1.20 running this example would require using the web
# endpoints because there is no API to do the same.
#
# It was manually tested to **not work** with Forgejo v1.21 & runner 3.0.1
#
on: [push]
jobs:

View file

@ -8,7 +8,7 @@ jobs:
- name: if true
if: true
id: if_true
run: echo 'check=good' >> $GITHUB_OUTPUT
run: echo 'check=good' >> $FORGEJO_OUTPUT
- name: verify if true was run
run: test ${{ steps.if_true.outputs.check }} = good

View file

@ -13,10 +13,10 @@ outputs:
runs:
using: "composite"
steps:
- name: GITHUB_ACTION_PATH
- name: FORGEJO_ACTION_PATH
run: |
set -x
test "$(basename $GITHUB_ACTION_PATH)" = local-action
test "$GITHUB_ACTION_PATH" = "${{ env.GITHUB_ACTION_PATH }}"
test -e "$FORGEJO_ACTION_PATH"
test "$FORGEJO_ACTION_PATH" = "${{ env.FORGEJO_ACTION_PATH }}"
- run: echo key=${{ inputs.input-two-required }} >> $GITHUB_OUTPUT
- run: echo key=${{ inputs.input-two-required }} >> $FORGEJO_OUTPUT

View file

@ -0,0 +1,16 @@
on: [push]
jobs:
job1:
runs-on: lxc
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- run: systemctl --no-pager list-units
job2:
runs-on: lxc
steps:
- run: echo OK2
job3:
runs-on: lxc
steps:
- run: echo OK3

View file

@ -0,0 +1,31 @@
log:
level: debug
job_level: debug
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels: ["lxc:lxc://debian:bookworm"]
cache:
enabled: false
dir: ""
host: ""
port: 0
container:
network: "bridge"
privileged: false
options:
workdir_parent:
valid_volumes: ["/srv/example"]
docker_host: ""
host:
workdir_parent:

1
actions/example-lxc/setup.sh Executable file
View file

@ -0,0 +1 @@
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload

View file

@ -0,0 +1 @@
forgejo-runner.sh reload

View file

@ -0,0 +1,49 @@
on: [push]
jobs:
define-matrix:
runs-on: docker
outputs:
scalar-value: ${{ steps.define.outputs.scalar }}
array-value: ${{ steps.define.outputs.array }}
matrix-value: ${{ steps.define.outputs.matrix }}
steps:
- id: define
run: |
echo 'scalar=scalar value' >> "$FORGEJO_OUTPUT"
echo 'array=["value 1", "value 2"]' >> "$FORGEJO_OUTPUT"
echo 'matrix={"dimension-1": ["d1 v1", "d1 v2"], "dimension-2": ["d2 v1", "d2 v2"]}' >> "$GITHUB_OUTPUT"
scalar-job:
runs-on: docker
needs: define-matrix
strategy:
matrix:
scalar:
- "${{ needs.define-matrix.outputs.scalar-value }}"
- hard-coded value
steps:
- run: |
set -x
[ "${{ matrix.scalar }}" = "scalar value" ] || [ "${{ matrix.scalar }}" = "hard-coded value" ] || exit 1
array-job:
runs-on: docker
needs: define-matrix
strategy:
matrix:
array: ${{ fromJSON(needs.define-matrix.outputs.array-value) }}
steps:
- run: |
set -x
[ "${{ matrix.array }}" = "value 1" ] || [ "${{ matrix.array }}" = "value 2" ] || exit 1
matrix-job:
runs-on: docker
needs: define-matrix
strategy:
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix-value) }}
steps:
- run: |
set -x
[ "${{ matrix.dimension-1 }}" = "d1 v1" ] || [ "${{ matrix.dimension-1 }}" = "d1 v2" ] || exit 1
[ "${{ matrix.dimension-2 }}" = "d2 v1" ] || [ "${{ matrix.dimension-2 }}" = "d2 v2" ] || exit 1

View file

@ -0,0 +1,10 @@
forgejo-test-helper.sh run_workflow actions/example-$example $url root example-$example setup-forgejo $token
# Verify that the matrix in the job was expanded correctly by checking that
# there are 9 completed jobs, by their commit statuses being present on the
# main branch's HEAD.
api=$url/api/v1
sha=$(forgejo-curl.sh api_json $api/repos/root/example-matrix-dynamic/branches/main | jq -r ".commit.id")
num_runs=$(forgejo-curl.sh api_json $api/repos/root/example-matrix-dynamic/commits/$sha/status | jq ".total_count")
echo "Expecting 9 commit statuses, found $num_runs commit statuses"
test $num_runs = 9

View file

@ -0,0 +1,12 @@
on: [push]
jobs:
test:
runs-on: docker
name: name-${{ matrix.version }}
strategy:
matrix:
version: [1.18, 1.19]
steps:
- run: |
set -x
test "${{ matrix.version }}"

View file

@ -0,0 +1,19 @@
on: [push]
jobs:
job1:
runs-on: docker
outputs:
job1output: ${{ steps.step1.outputs.value }}
steps:
- id: step1
run: |
set -x
echo "value=value1" >> $FORGEJO_OUTPUT
job2:
needs: [job1]
runs-on: docker
steps:
- run: |
set -x
test "${{ needs.job1.outputs.job1output }}" = "value1"

View file

@ -0,0 +1,23 @@
on:
schedule:
- cron: '* * * * *'
jobs:
test:
runs-on: ${{ vars.TEST_SCHEDULE_RUNSON }}
container:
image: data.forgejo.org/oci/debian:trixie
options: "--volume /srv/example:/srv/example"
steps:
- name: save context
run: |
d=/srv/example/post-7-0-schedule/contexts/$FORGEJO_EVENT_NAME
mkdir -p $d
cat > $d/github <<'EOF'
${{ toJSON(github) }}
EOF
- run: |
echo "TEST_SCHEDULE_RUNSON=${{ vars.TEST_SCHEDULE_RUNSON }}"
touch /srv/example/post-7-0-schedule-volume/DONE

View file

@ -0,0 +1,30 @@
forgejo-test-helper.sh push_workflow actions/example-$example $url root example-$example setup-forgejo $token
forgejo-curl.sh web -X POST http://${HOST_PORT}/admin/actions/variables/1/delete || true
forgejo-curl.sh web --form name=TEST_SCHEDULE_RUNSON --form data=docker http://${HOST_PORT}/admin/actions/variables/new
#
# Verify that creating a new branch with the same SHA as the default branch
# does not change the ref associated with the schedule
#
# See https://codeberg.org/forgejo/forgejo/pulls/1941 for more information
#
function verify_ref() {
local ref=$(sqlite3 $DIR/forgejo-work-path/forgejo.db 'select ref from action_schedule')
test "${ref##*/}" = "main"
}
verify_ref
api=$url/api/v1
forgejo-curl.sh api_json --data '{"new_branch_name":"zzzz"}' $api/repos/root/example-post-7-0-schedule/branches
verify_ref
# runs once per minute, give it three minutes max before declaring failure
if ! RETRY_DELAYS="30 30 30 30 30 30" forgejo.sh retry test -f /srv/example/post-7-0-schedule-volume/DONE; then
cat $FORGEJO_RUNNER_LOGS
false
fi
c=/srv/example/post-7-0-schedule/contexts/schedule/github
cat $c
test "schedule" = "$(jq -r .event_name <$c)"
test "schedule" = "$(jq -r .event.action <$c)"

View file

@ -0,0 +1 @@
mkdir -p /srv/example/post-7-0-schedule-volume

View file

@ -0,0 +1,10 @@
on:
workflow_call:
jobs:
build:
runs-on: "docker"
container:
image: data.forgejo.org/oci/node:24-trixie
steps:
- run: echo 'OK'

View file

@ -0,0 +1,11 @@
on:
push:
jobs:
test:
# `runs-on` disables workflow expansion. We want that in this case, because then Forgejo Runner has to authenticate
# itself to access the reusable workflow.
runs-on: docker
container:
image: data.forgejo.org/oci/node:24-trixie
uses: ./.forgejo/workflows/reusable.yaml

View file

@ -0,0 +1,42 @@
api="$url/api/v1"
export d=/srv/example/private-workflow-call
function main() {
mkdir -p "$d"
local repo
repo="root/example-$example"
forgejo-test-helper.sh push_workflow "actions/example-$example" "$url" root "example-$example" setup-forgejo "$token"
# push_workflow creates the repository and triggers a first workflow run. Wait for it to succeed. Ensures that the
# workflow is valid.
local sha
sha="$(forgejo-test-helper.sh branch_tip "$url" "$repo" main)"
forgejo-test-helper.sh wait_success "$url" "$repo" "$sha"
# Make the repository private. That is necessary to verify that Forgejo Runner includes the correct credentials when
# cloning the workflow.
forgejo-curl.sh api_json -X PATCH --data-raw '{"private":true}' "$api/repos/root/example-$example"
# Create a new commit that triggers a new workflow run that can be identified uniquely.
(
cd "$d" || exit 1
git clone "$url/root/example-$example"
cd "example-$example" || exit 1
git config user.email root@example.com
git config user.name username
echo "A new file" > test.txt
git add .
git commit -m 'Commit a new file'
git push
)
# Wait for the workflow pulled from the private repository to succeed.
local new_sha
new_sha="$(forgejo-test-helper.sh branch_tip "$url" "$repo" main)"
[[ "$new_sha" != "$sha" ]] || exit 1
forgejo-test-helper.sh wait_success "$url" "$repo" "$new_sha"
}
main

View file

@ -0,0 +1 @@
mkdir -p /srv/example/private-workflow-call

View file

@ -9,7 +9,7 @@ jobs:
test:
runs-on: docker
container:
image: code.forgejo.org/oci/node:20-bookworm
image: data.forgejo.org/oci/node:20-bookworm
options: "--volume /srv/example:/srv/example"
steps:
@ -17,45 +17,45 @@ jobs:
shell: bash
run: |
set -x
test $GITHUB_TOKEN = ${{ env.GITHUB_TOKEN }}
test $GITHUB_TOKEN = ${{ github.token }}
test $FORGEJO_TOKEN = ${{ env.FORGEJO_TOKEN }}
test $FORGEJO_TOKEN = ${{ forgejo.token }}
export DEBIAN_FRONTEND=noninteractive ; apt-get -qq update ; apt-get install -y -qq curl git >& /dev/null
curl -sS -o /usr/local/bin/forgejo-curl.sh https://code.forgejo.org/forgejo/forgejo-curl/raw/branch/main/forgejo-curl.sh && chmod +x /usr/local/bin/forgejo-curl.sh
forgejo-curl.sh --token "$GITHUB_TOKEN" login $GITHUB_SERVER_URL
forgejo-curl.sh api_json $GITHUB_SERVER_URL/api/v1/user
forgejo-curl.sh --token "$FORGEJO_TOKEN" login $FORGEJO_SERVER_URL
forgejo-curl.sh api_json $FORGEJO_SERVER_URL/api/v1/user
- name: determine if the PR is from a fork
id: forked
run: |
if test ${{ github.event.pull_request.base.repo.full_name }} = ${{ github.event.pull_request.head.repo.full_name }} ; then
echo value=false >> $GITHUB_OUTPUT
if test ${{ forgejo.event.pull_request.base.repo.full_name }} = ${{ forge.event.pull_request.head.repo.full_name }} ; then
echo value=false >> $FORGEJO_OUTPUT
else
echo value=true >> $GITHUB_OUTPUT
echo value=true >> $FORGEJO_OUTPUT
fi
# See also actions/example-context/.forgejo/workflows/test.yml
- name: env.GITHUB_BASE_REF
- name: env.FORGEJO_BASE_REF
run: |
set -x
test "$GITHUB_BASE_REF" = main
test "$GITHUB_BASE_REF" = "${{ env.GITHUB_BASE_REF }}"
test "$FORGEJO_BASE_REF" = main
test "$FORGEJO_BASE_REF" = "${{ env.FORGEJO_BASE_REF }}"
# See also actions/example-context/.forgejo/workflows/test.yml
- name: env.GITHUB_HEAD_REF
- name: env.FORGEJO_HEAD_REF
run: |
set -x
if ${{ steps.forked.outputs.value }} ; then
test "$GITHUB_HEAD_REF" = main
test "$FORGEJO_HEAD_REF" = main
else
test "$GITHUB_HEAD_REF" = other
test "$FORGEJO_HEAD_REF" = other
fi
test "$GITHUB_HEAD_REF" = "${{ env.GITHUB_HEAD_REF }}"
test "$FORGEJO_HEAD_REF" = "${{ env.FORGEJO_HEAD_REF }}"
- name: secrets
shell: bash
run: |
set -x
case $GITHUB_EVENT_NAME in
case $FORGEJO_EVENT_NAME in
pull_request_target)
#
# all PRs: secrets
@ -76,7 +76,7 @@ jobs:
fi
;;
*)
echo unexpected event $GITHUB_EVENT_NAME
echo unexpected event $FORGEJO_EVENT_NAME
false
;;
esac
@ -95,9 +95,9 @@ jobs:
#
# create an issue
#
base_repo=${{ github.event.pull_request.base.repo.full_name }}
forgejo-curl.sh api_json --data-raw '{"title":"ISSUE"}' $GITHUB_SERVER_URL/api/v1/repos/$base_repo/issues
url=$(echo $GITHUB_SERVER_URL | sed -e "s|://|://$GITHUB_TOKEN@|")
base_repo=${{ forgejo.event.pull_request.base.repo.full_name }}
forgejo-curl.sh api_json --data-raw '{"title":"ISSUE"}' $FORGEJO_SERVER_URL/api/v1/repos/$base_repo/issues
url=$(echo $FORGEJO_SERVER_URL | sed -e "s|://|://$FORGEJO_TOKEN@|")
git clone $url/$base_repo base
branch=B$RANDOM
(
@ -108,7 +108,7 @@ jobs:
echo CHANGE >> README
git add .
git commit -m 'change'
case $GITHUB_EVENT_NAME in
case $FORGEJO_EVENT_NAME in
pull_request_target|pull_request)
#
# repository write scope via http git passthrough
@ -117,15 +117,15 @@ jobs:
#
# repository write scope via the API
#
assert_fail_if_forked forgejo-curl.sh api_json --data-raw '{"title":"PR","base":"main","head":"'$branch'"}' $GITHUB_SERVER_URL/api/v1/repos/$base_repo/pulls
assert_fail_if_forked forgejo-curl.sh api_json --data-raw '{"color":"#ffffff","name":"labelname"}' $GITHUB_SERVER_URL/api/v1/repos/$base_repo/labels
assert_fail_if_forked forgejo-curl.sh api_json --data-raw '{"title":"PR","base":"main","head":"'$branch'"}' $FORGEJO_SERVER_URL/api/v1/repos/$base_repo/pulls
assert_fail_if_forked forgejo-curl.sh api_json --data-raw '{"color":"#ffffff","name":"labelname"}' $FORGEJO_SERVER_URL/api/v1/repos/$base_repo/labels
#
# See https://codeberg.org/forgejo/forgejo/issues/1525
#
! forgejo-curl.sh api_json --data-raw '{"new_branch_name":"B'$RANDOM'"}' $GITHUB_SERVER_URL/api/v1/repos/$base_repo/branches
! forgejo-curl.sh api_json --data-raw '{"new_branch_name":"B'$RANDOM'"}' $FORGEJO_SERVER_URL/api/v1/repos/$base_repo/branches
;;
*)
echo unexpected event $GITHUB_EVENT_NAME
echo unexpected event $FORGEJO_EVENT_NAME
false
;;
esac
@ -133,17 +133,17 @@ jobs:
- name: save event
run: |
d=/srv/example/pull-request/contexts/${{ github.event.pull_request.head.repo.owner.username }}/$GITHUB_EVENT_NAME
d=/srv/example/pull-request/contexts/${{ forgejo.event.pull_request.head.repo.owner.username }}/$FORGEJO_EVENT_NAME
mkdir -p $d
cat > $d/github <<'EOF'
${{ toJSON(github) }}
EOF
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: https://data.forgejo.org/actions/checkout@v4
- name: checkout the default branch if pull_request_target
run: |
set -x
case $GITHUB_EVENT_NAME in
case $FORGEJO_EVENT_NAME in
pull_request_target)
! test -f file-unique-to-the-pr-branch
;;
@ -151,7 +151,7 @@ jobs:
test -f file-unique-to-the-pr-branch
;;
*)
echo unexpected event $GITHUB_EVENT_NAME
echo unexpected event $FORGEJO_EVENT_NAME
false
;;
esac

View file

@ -0,0 +1,11 @@
#!/bin/bash
set -ex
c=$d/contexts
test opened = "$(jq -r .event.action <$c/fork-org/pull_request/github)"
test opened = "$(jq -r .event.action <$c/fork-org/pull_request_target/github)"
test opened = "$(jq -r .event.action <$c/root/pull_request/github)"
test opened = "$(jq -r .event.action <$c/root/pull_request_target/github)"

View file

@ -1,11 +0,0 @@
#!/bin/bash
set -ex
c=$d/contexts
test opened = "$(jq -r .event.action < $c/fork-org/pull_request/github)"
test opened = "$(jq -r .event.action < $c/fork-org/pull_request_target/github)"
test opened = "$(jq -r .event.action < $c/root/pull_request/github)"
test opened = "$(jq -r .event.action < $c/root/pull_request_target/github)"

View file

@ -3,7 +3,7 @@ export d=/srv/example/pull-request
PROOF='some proof'
function setup() {
function main() {
mkdir -p $d
forgejo-test-helper.sh push_workflow actions/example-$example $url root example-$example setup-forgejo $token
@ -12,50 +12,45 @@ function setup() {
forgejo-curl.sh api_json --data-raw '{"organization":"fork-org"}' $api/repos/root/example-pull-request/forks
forgejo-curl.sh api_json -X PUT --data-raw '{"data":"AAAA"}' $api/repos/root/example-pull-request/actions/secrets/SECRET
(
cd $d
git clone $url/fork-org/example-pull-request fork
cd fork
git config user.email root@example.com
git config user.name username
echo fork $PROOF >> README
touch file-unique-to-the-pr-branch
git add .
git commit -m 'fork change'
git push
cd $d
git clone $url/fork-org/example-pull-request fork
cd fork
git config user.email root@example.com
git config user.name username
echo fork $PROOF >>README
touch file-unique-to-the-pr-branch
git add .
git commit -m 'fork change'
git push
)
forgejo.sh retry forgejo-curl.sh api_json --data-raw '{"title":"PR from fork","base":"main","head":"fork-org:main"}' $api/repos/root/example-pull-request/pulls
(
cd $d
git clone $url/root/example-pull-request
cd example-pull-request
git checkout -b other
git config user.email root@example.com
git config user.name username
touch file-unique-to-the-pr-branch
echo other $PROOF >> README
git add .
git commit -m 'other change'
git push --force -u origin other
cd $d
git clone $url/root/example-pull-request
cd example-pull-request
git checkout -b other
git config user.email root@example.com
git config user.name username
touch file-unique-to-the-pr-branch
echo other $PROOF >>README
git add .
git commit -m 'other change'
git push --force -u origin other
)
forgejo.sh retry forgejo-curl.sh api_json --data-raw '{"title":"PR same repo","base":"main","head":"other"}' $api/repos/root/example-pull-request/pulls
export RETRY_DELAYS="60 60 60 60 60 60 60"
for assert in $EXAMPLE_DIR/assert-*.sh ; do
if ! forgejo.sh retry $assert ; then
find $d
sed -e 's/^/[RUNNER LOGS]/' < $FORGEJO_RUNNER_LOGS
false
fi
for assert in $EXAMPLE_DIR/assert-*.sh; do
if ! forgejo.sh retry $assert; then
find $d
sed -e 's/^/[RUNNER LOGS]/' <$FORGEJO_RUNNER_LOGS
false
fi
done
}
function main() {
setup
}
main

View file

@ -1,2 +1 @@
mkdir -p /srv/example/pull-request

View file

@ -11,8 +11,8 @@ forgejo-test-helper.sh wait_running $url $repo $sha
#
# push to the same branch
#
forgejo-test-helper.sh push_workflow actions/example-$example $url root example-$example setup-forgejo $token
forgejo-test-helper.sh push_workflow actions/example-echo $url root example-$example setup-forgejo $token
#
# wait for the workflow to be canceld as a result of the previous push
# wait for the workflow to be canceled as a result of the previous push
#
forgejo-test-helper.sh wait_failure $url $repo $sha 'Has been cancelled'

View file

@ -9,14 +9,14 @@ jobs:
test:
runs-on: docker
container:
image: code.forgejo.org/oci/node:20-bookworm
image: data.forgejo.org/oci/node:20-bookworm
volumes:
- /srv/example:/srv/example
steps:
- name: save event
run: |
d=/srv/example/push/contexts/$GITHUB_EVENT_NAME
d=/srv/example/push/contexts/$FORGEJO_EVENT_NAME
mkdir -p $d
cat > $d/github <<'EOF'
${{ toJSON(github) }}

View file

@ -0,0 +1,15 @@
on:
schedule:
- cron: "* * * * *"
jobs:
test:
runs-on: docker
container:
image: data.forgejo.org/oci/debian:trixie
volumes:
- /srv/example:/srv/example
steps:
- run: |
while ! [ -f /srv/example/schedule-noncancel/PUSHED ]; do
sleep 3
done

View file

@ -0,0 +1,99 @@
repo=root/example-$example
#
# delete the repository
#
api=$url/api/v1
if forgejo-curl.sh api_json -X GET $api/repos/root/example-$example; then
forgejo-curl.sh api_json -X DELETE $api/repos/root/example-$example
fi
#
# push the repository
#
forgejo-test-helper.sh push_workflow actions/example-$example $url root example-$example setup-forgejo $token
#
# get the run id of the workflow that just started
#
getScheduleRun() {
rm -f $DIR/forgejo-work-path/forgejo.copy.db
cp $DIR/forgejo-work-path/forgejo.db $DIR/forgejo-work-path/forgejo.copy.db
sqlite3 $DIR/forgejo-work-path/forgejo.copy.db \
"pragma busy_timeout = 5000; \
select action_run.id \
from action_run \
inner join action_schedule on action_run.schedule_id = action_schedule.id \
inner join repository on action_schedule.repo_id = repository.id \
where repository.name = 'example-schedule-noncancel' \
order by action_run.created desc limit 1" | sed '2q;d'
}
run_id=$(getScheduleRun)
while [ -z $run_id ]; do
echo waiting 5...
sleep 5
run_id=$(getScheduleRun)
done
echo Schedule run id: $run_id
#
# Wait for it to be started
#
checkStarted() {
rm -f $DIR/forgejo-work-path/forgejo.copy.db
cp $DIR/forgejo-work-path/forgejo.db $DIR/forgejo-work-path/forgejo.copy.db
sqlite3 $DIR/forgejo-work-path/forgejo.copy.db \
"pragma busy_timeout = 5000; \
select id \
from action_run \
where id = $run_id \
and started is not null" | sed '2q;d'
}
started_check=$(checkStarted)
while [ -z $started_check ]; do
echo waiting 2...
sleep 2
started_check=$(checkStarted)
done
echo Run has started
echo Push to repo again
#
# Push to the repo again
#
forgejo-test-helper.sh push_workflow actions/example-echo $url root example-$example setup-forgejo $token
echo Signal to the workflow that the push has happened
mkdir -p /srv/example/schedule-noncancel
touch /srv/example/schedule-noncancel/PUSHED
#
# Wait for the workflow to finish anyway
#
echo Wait for workflow to finish
checkFinished() {
rm -f $DIR/forgejo-work-path/forgejo.copy.db
cp $DIR/forgejo-work-path/forgejo.db $DIR/forgejo-work-path/forgejo.copy.db
sqlite3 $DIR/forgejo-work-path/forgejo.copy.db \
"pragma busy_timeout = 5000; \
select status \
from action_run \
where id = $run_id \
and (status != 6 and status != 5)" | sed '2q;d'
}
finished_status=$(checkFinished)
while [ -z $finished_status ]; do
echo waiting 5...
sleep 5
finished_status=$(checkFinished)
done
echo Workflow finished.
rm -f $DIR/forgejo-work-path/forgejo.copy.db
test $finished_status = 1

View file

@ -0,0 +1,4 @@
#
# this will effectively discard any linger workflow so they do not interfere with other tests
#
forgejo-runner.sh reload

View file

@ -2,16 +2,32 @@ on: [push]
jobs:
#
# No volume involved
# No volume involved & the container is implicit
#
simple-no-container:
runs-on: docker
services:
pgsql:
image: data.forgejo.org/oci/postgres:15
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: postgres
steps:
- run: |
apt-get update -qq
apt-get install -y -qq postgresql-client
PGPASSWORD=postgres psql -h pgsql -U postgres -c '\dt' test
#
# No volume involved & the container is explicit
#
simple:
runs-on: docker
container:
image: code.forgejo.org/oci/debian:bookworm
image: data.forgejo.org/oci/debian:trixie
services:
pgsql:
image: code.forgejo.org/oci/postgres:15
image: data.forgejo.org/oci/postgres:15
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: postgres
@ -27,7 +43,7 @@ jobs:
needs: [simple]
runs-on: docker
container:
image: code.forgejo.org/oci/debian:bookworm
image: data.forgejo.org/oci/debian:trixie
options: "--volume /srv/example-service-volume-valid:/srv/example-service-volume-valid --volume /srv/example-service-volume-invalid:/srv/example-service-volume-invalid"
steps:
@ -42,12 +58,12 @@ jobs:
needs: [volume-on-step]
runs-on: docker
container:
image: code.forgejo.org/oci/debian:bookworm
image: data.forgejo.org/oci/debian:trixie
options: "--volume /srv/example-service-volume-valid:/srv/example-service-volume-valid"
services:
myservice:
image: code.forgejo.org/oci/debian:bookworm
image: data.forgejo.org/oci/debian:trixie
options: "--volume /srv/example-service-volume-valid:/srv/example-service-volume-valid"
cmd: ["bash", "-c", "echo -n SUCCESS > /srv/example-service-volume-valid ; sleep infinity"]

View file

@ -1,6 +1,6 @@
log:
level: info
level: debug
runner:
file: .runner

View file

@ -1,3 +1,3 @@
> /srv/example-service-volume-valid
> /srv/example-service-volume-invalid
>/srv/example-service-volume-valid
>/srv/example-service-volume-invalid
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload

View file

@ -0,0 +1,87 @@
on: [push]
env:
ASSERT_SHELL: 'set -x ; readlink /proc/$$/exe ; readlink /proc/$$/exe | grep '
jobs:
default:
# docker:docker://code.forgejo.org/oci/node:22-bookworm
runs-on: docker
steps:
- name: default is bash
run: |
${{ env.ASSERT_SHELL }} /bash
sh-fallback:
needs: [default]
# alpine:docker://code.forgejo.org/oci/alpine:latest
runs-on: alpine
steps:
- name: default is bash but with a fallback to sh in case it does not exist
run: |
${{ env.ASSERT_SHELL }} /busybox
sh-fallback-with-container:
needs: [sh-fallback]
runs-on: docker
container:
image: data.forgejo.org/oci/alpine:latest
steps:
- name: default is bash but with a fallback to sh in case it does not exist
run: |
${{ env.ASSERT_SHELL }} /busybox
defaults-run:
needs: [sh-fallback-with-container]
# alpine:docker://code.forgejo.org/oci/alpine:latest
runs-on: alpine
defaults:
run:
shell: sh
steps:
- name: default is sh which is an alias for busybox in alpine
run: |
${{ env.ASSERT_SHELL }} /busybox
python:
needs: [alpine]
runs-on: docker
container:
image: data.forgejo.org/oci/python:slim
steps:
- name: python => python {0}
shell: python
run: |
print("something")
other:
needs: [python]
runs-on: docker
container:
image: data.forgejo.org/oci/node:22-bookworm
steps:
- name: default is bash
run: |
${{ env.ASSERT_SHELL }} /bash
- name: bash => bash --noprofile --norc -e -o pipefail {0}
shell: bash
run: |
${{ env.ASSERT_SHELL }} /bash
shopt -o
shopt -o | grep --quiet 'pipefail.*on'
- name: sh => sh -e {0}
shell: sh
run: |
${{ env.ASSERT_SHELL }} /dash
- name: node => node {0}
shell: node
run: |
console.log("something")
- name: dash -e {0}
shell: dash -e {0}
run: |
${{ env.ASSERT_SHELL }} /dash

View file

@ -0,0 +1,32 @@
log:
level: debug
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels:
- docker:docker://code.forgejo.org/oci/node:22-bookworm
- alpine:docker://code.forgejo.org/oci/alpine:latest
cache:
enabled: false
dir: ""
host: ""
port: 0
container:
network: ""
privileged: false
options:
workdir_parent:
valid_volumes: []
docker_host: ""
host:
workdir_parent:

1
actions/example-shell/setup.sh Executable file
View file

@ -0,0 +1 @@
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload

View file

@ -0,0 +1 @@
forgejo-runner.sh reload

View file

@ -7,14 +7,14 @@ jobs:
test:
runs-on: docker
container:
image: code.forgejo.org/oci/node:20-bookworm
image: data.forgejo.org/oci/node:20-bookworm
volumes:
- /srv/example:/srv/example
steps:
- name: save event
run: |
d=/srv/example/tag/contexts/$GITHUB_EVENT_NAME
d=/srv/example/tag/contexts/$FORGEJO_EVENT_NAME
mkdir -p $d
cat > $d/github <<'EOF'
${{ toJSON(github) }}

View file

@ -0,0 +1,10 @@
on: [push]
jobs:
build:
runs-on: docker
container:
image: data.forgejo.org/oci/docker:28-cli
steps:
- run: ls -l /var/run/docker.sock
- run: docker ps

View file

@ -0,0 +1,30 @@
log:
level: debug
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels: ["docker:docker://code.forgejo.org/oci/node:20-bookworm"]
cache:
enabled: true
dir: "/srv/example/cache"
host: ""
port: 0
container:
network: "bridge"
privileged: false
options:
workdir_parent:
valid_volumes: ["/srv/example"]
docker_host: "unix:///var/run/docker.sock"
host:
workdir_parent:

View file

@ -0,0 +1 @@
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload

View file

@ -0,0 +1 @@
forgejo-runner.sh reload

View file

@ -0,0 +1,10 @@
on: [push]
jobs:
build:
runs-on: docker
container:
image: data.forgejo.org/oci/docker:28-cli
steps:
- run: ls -l /var/run/docker.sock
- run: docker ps

View file

@ -0,0 +1,30 @@
log:
level: debug
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels: ["docker:docker://code.forgejo.org/oci/node:20-bookworm"]
cache:
enabled: true
dir: "/srv/example/cache"
host: ""
port: 0
container:
network: "bridge"
privileged: false
options:
workdir_parent:
valid_volumes: ["/srv/example"]
docker_host: "automount"
host:
workdir_parent:

View file

@ -0,0 +1 @@
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload

View file

@ -0,0 +1 @@
forgejo-runner.sh reload

View file

@ -0,0 +1,11 @@
on: [push]
jobs:
build:
runs-on: docker
container:
image: data.forgejo.org/oci/node:20-bookworm
steps:
- run: |
! test -e /var/run/docker.sock
! env | grep DOCKER_HOST

Some files were not shown because too many files have changed in this diff Show more