mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(ci): keep locale refresh matrices alive
This commit is contained in:
@@ -24,7 +24,7 @@ permissions:
|
||||
|
||||
concurrency:
|
||||
group: control-ui-locale-refresh-${{ github.event_name == 'push' && github.ref || github.event_name == 'workflow_dispatch' && format('manual-{0}', github.run_id) || github.event_name == 'release' && format('release-{0}', github.event.release.tag_name) || format('{0}-{1}', github.event_name, github.run_id) }}
|
||||
cancel-in-progress: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
cancel-in-progress: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.actor != 'github-actions[bot]' }}
|
||||
|
||||
jobs:
|
||||
plan:
|
||||
|
||||
@@ -22,7 +22,7 @@ permissions:
|
||||
|
||||
concurrency:
|
||||
group: native-app-locale-refresh-${{ github.event_name == 'push' && github.ref || format('manual-{0}', github.run_id) }}
|
||||
cancel-in-progress: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
cancel-in-progress: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.actor != 'github-actions[bot]' }}
|
||||
|
||||
jobs:
|
||||
refresh:
|
||||
|
||||
@@ -9,6 +9,7 @@ const CACHE_V5 = "actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae
|
||||
const UPLOAD_ARTIFACT_V7 = "actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a";
|
||||
const OPENGREP_PR_DIFF_WORKFLOW = ".github/workflows/opengrep-precise.yml";
|
||||
const OPENGREP_FULL_WORKFLOW = ".github/workflows/opengrep-precise-full.yml";
|
||||
const CONTROL_UI_LOCALE_REFRESH_WORKFLOW = ".github/workflows/control-ui-locale-refresh.yml";
|
||||
const NATIVE_APP_LOCALE_REFRESH_WORKFLOW = ".github/workflows/native-app-locale-refresh.yml";
|
||||
|
||||
function readCiWorkflow() {
|
||||
@@ -119,7 +120,8 @@ describe("ci workflow guards", () => {
|
||||
expect(findUnpinnedExternalActions()).toEqual([]);
|
||||
});
|
||||
|
||||
it("keeps native locale refreshes main-only and rebases before retrying pushes", () => {
|
||||
it("keeps locale refresh bots from cancelling active refresh matrices", () => {
|
||||
const controlUiWorkflow = parse(readFileSync(CONTROL_UI_LOCALE_REFRESH_WORKFLOW, "utf8"));
|
||||
const source = readFileSync(NATIVE_APP_LOCALE_REFRESH_WORKFLOW, "utf8");
|
||||
const workflow = parse(source);
|
||||
const refresh = workflow.jobs.refresh;
|
||||
@@ -129,6 +131,12 @@ describe("ci workflow guards", () => {
|
||||
|
||||
expect(refresh.if).toContain("github.ref == 'refs/heads/main'");
|
||||
expect(refresh.strategy.matrix.locale).toContain("sv");
|
||||
expect(controlUiWorkflow.concurrency["cancel-in-progress"]).toContain(
|
||||
"github.actor != 'github-actions[bot]'",
|
||||
);
|
||||
expect(workflow.concurrency["cancel-in-progress"]).toContain(
|
||||
"github.actor != 'github-actions[bot]'",
|
||||
);
|
||||
expect(workflow.on.push.paths).toContain("ui/src/i18n/.i18n/glossary.*.json");
|
||||
expect(commitStep.run).toContain("for attempt in 1 2 3 4 5");
|
||||
expect(commitStep.run).toContain('git fetch origin "${TARGET_BRANCH}"');
|
||||
|
||||
Reference in New Issue
Block a user