From f05230848384ed949ea73af6d6b0b695c514be90 Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 17 Apr 2026 21:17:45 +0000 Subject: [PATCH] Switch to version 2: added .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..9aa1e08 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,37 @@ +name: Code Check + +on: + workflow_dispatch: + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - name: Checkout + run: git clone --depth 1 --branch ${{ gitea.ref_name }} ${{ gitea.server_url }}/${{ gitea.repository }}.git . || exit 1 + + - name: Install dependencies + run: | + if [ -d "/var/node_modules_cache/node_modules" ]; then + ln -s /var/node_modules_cache/node_modules ./node_modules + else + npm ci --prefer-offline --no-audit + fi + timeout-minutes: 5 + + - name: TypeScript check + run: npm run typecheck 2>&1 | tee build.log + timeout-minutes: 3 + + - name: ESLint check + run: npm run lint 2>&1 | tee -a build.log + timeout-minutes: 3 + + - name: Upload build log on failure + if: failure() + uses: actions/upload-artifact@v3 + with: + name: build-log + path: build.log + retention-days: 1