From 21c7409017b8a621e309501e166674fb2ddbdf98 Mon Sep 17 00:00:00 2001 From: Ivan Vasilev Date: Sat, 29 Aug 2026 03:21:40 +0300 Subject: [PATCH] Check every push with CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nothing verified a push to main: the only workflow triggers on v* tags, so an incomplete commit — one whose new files were never staged, leaving an import pointing at a file that does not exist — sat on main for two days without a signal. This runs on every branch push and pull request: bash -n on the installer, tsc across awg-ctrl, awg-ui and cli, and the Vite build. awg-ui's tsconfig covers server.ts, so the missing-module case is exactly what the awg-ui step reports. The same workflow is added for both hosts, since releases are now published from GitHub and Gitea alike. awg-ctrl's tsconfig had `include: [""]`, which matches no files at all (TS18003) — the awg-ctrl step would have failed on the config rather than on real errors, so it now points at index.ts. --- .gitea/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 45 +++++++++++++++++++++++++++++++++++++ awg-ctrl/tsconfig.json | 2 +- 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/ci.yml create mode 100644 .github/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..4040f80 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,48 @@ +# Проверка на каждый пуш и PR (Gitea Actions). Ловит то, из-за чего main однажды уехал +# нерабочим: файл, на который есть import, не попал в коммит (tsc по awg-ui +# видит это как «Cannot find module»), плюс битый синтаксис установщика. +# Релиз собирается отдельно (release.yml, только на теги v*). +# +# Требует включённых Actions в настройках репозитория и раннера с меткой +# ubuntu-latest — иначе поправь runs-on под свою метку. + +name: ci + +on: + push: + branches: ['**'] + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Installer syntax + run: bash -n install.sh + + - name: awg-ctrl types + working-directory: awg-ctrl + run: | + npm install + npx tsc --noEmit -p tsconfig.json + + # tsconfig awg-ui включает server.ts — именно этот шаг и поймал бы + # пропавший ./ma7. + - name: awg-ui types and build + working-directory: awg-ui + run: | + npm install + npx tsc --noEmit -p tsconfig.json + npm run build + + - name: cli types + working-directory: cli + run: | + npm install + npx tsc --noEmit -p tsconfig.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d8f0856 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +# Проверка на каждый пуш и PR. Ловит то, из-за чего main однажды уехал +# нерабочим: файл, на который есть import, не попал в коммит (tsc по awg-ui +# видит это как «Cannot find module»), плюс битый синтаксис установщика. +# Релиз собирается отдельно (release.yml, только на теги v*). + +name: ci + +on: + push: + branches: ['**'] + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Installer syntax + run: bash -n install.sh + + - name: awg-ctrl types + working-directory: awg-ctrl + run: | + npm install + npx tsc --noEmit -p tsconfig.json + + # tsconfig awg-ui включает server.ts — именно этот шаг и поймал бы + # пропавший ./ma7. + - name: awg-ui types and build + working-directory: awg-ui + run: | + npm install + npx tsc --noEmit -p tsconfig.json + npm run build + + - name: cli types + working-directory: cli + run: | + npm install + npx tsc --noEmit -p tsconfig.json diff --git a/awg-ctrl/tsconfig.json b/awg-ctrl/tsconfig.json index 0a19e97..d7f3b79 100644 --- a/awg-ctrl/tsconfig.json +++ b/awg-ctrl/tsconfig.json @@ -9,6 +9,6 @@ "outDir": "dist" }, "include": [ - "" + "index.ts" ] }