From 697d17c5962dd8d28775ab57f4ec2ab07fd7ee0f Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sat, 1 Jun 2024 17:51:28 +0800 Subject: [PATCH 1/4] ci: add schedule&workflow_dispatch triggers The schedule trigger will run CI everyday to make sure we catch any breakage caused by external reasons. The workflow_dispatch one is so that the repo owner can launch CI jobs manually. --- .github/workflows/CI.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3cb0adba7a..a26679d1d9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,6 +7,12 @@ on: pull_request: types: [opened, synchronize] + workflow_dispatch: + + # to execute once a day (more info see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule ) + schedule: + - cron: "0 0 * * *" + jobs: build: strategy: From 1e9073911dc5b431a7f227ce1eaf56a0e2727924 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sat, 1 Jun 2024 13:52:08 +0200 Subject: [PATCH 2/4] ci(prettier): rather use --check instead of -l Not sure why -l flag sometimes make command fail when it shouldn't. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c6da54187f..953b53f0e9 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "docs-preview": "vitepress preview docs", "lint": "eslint . --ext .js,.ts", "lint-fix": "eslint . --ext .js,.ts --fix", - "format": "prettier **/*.{ts,js,json,yml,md} -l", + "format": "prettier **/*.{ts,js,json,yml,md} --check", "format-fix": "prettier **/*.{ts,js,json,yml,md} --write", "publish": "lerna publish --conventional-commits", "reinstall": "yarn clean && yarn install", From eecd064f6fcb02022cf655c3a097ccf12a7f1695 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sat, 1 Jun 2024 13:59:10 +0200 Subject: [PATCH 3/4] ci: make format failure clearer --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a26679d1d9..494f327b28 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -53,7 +53,7 @@ jobs: run: yarn install --ignore-engines --frozen-lockfile - name: Check format - run: yarn format + run: yarn format || (yarn format-fix; git diff --exit-code) - name: Lint run: yarn lint From e41feb355e0a9fb9661a25ab37440e22b3eba654 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sat, 1 Jun 2024 14:05:54 +0200 Subject: [PATCH 4/4] ci: fix YML format (prettier) --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 494f327b28..babc2b471c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ on: # to execute once a day (more info see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule ) schedule: - - cron: "0 0 * * *" + - cron: '0 0 * * *' jobs: build: