From 6035c06e0f4c88c34b73f97abb8292ace69d4c32 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 29 Jul 2026 23:19:25 +0000 Subject: [PATCH] use central repo for common workflows --- .gitea/workflows/code-quality.yaml | 11 ++++++ .gitea/workflows/static_go.yaml | 33 ------------------ .gitea/workflows/style_web.yaml | 56 ------------------------------ 3 files changed, 11 insertions(+), 89 deletions(-) create mode 100644 .gitea/workflows/code-quality.yaml delete mode 100644 .gitea/workflows/static_go.yaml delete mode 100644 .gitea/workflows/style_web.yaml diff --git a/.gitea/workflows/code-quality.yaml b/.gitea/workflows/code-quality.yaml new file mode 100644 index 0000000..2c0e99a --- /dev/null +++ b/.gitea/workflows/code-quality.yaml @@ -0,0 +1,11 @@ +name: Code Quality + +on: + push: + branches: + - '*' + +jobs: + code-quality: + uses: tronnet/workflows/.github/workflows/code-quality.yml@main + secrets: inherit \ No newline at end of file diff --git a/.gitea/workflows/static_go.yaml b/.gitea/workflows/static_go.yaml deleted file mode 100644 index 0c641c5..0000000 --- a/.gitea/workflows/static_go.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Static Analysis -- Golang -run-name: 'Static Analysis -- Golang -- ${{ gitea.repository }} ${{ gitea.ref_name }} ${{ gitea.sha }}' -on: - push: - branches: - - '*' - -jobs: - lint-check: - runs-on: ubuntu-latest - steps: - - name: Check Out Repository - uses: actions/checkout@v4 - with: - submodules: 'true' - - - name: Initialize Runner - uses: actions/setup-go@v7 - with: - go-version-file: 'go.mod' - - - name: Initialize Go - run: make build-web && go get . - - - name: Run Go Vet - id: static_govet - if: always() - run: go vet ./... - - - name: Verify Static Analysis - if: > - steps.static_govet.outcome != 'success' - run: exit 1 \ No newline at end of file diff --git a/.gitea/workflows/style_web.yaml b/.gitea/workflows/style_web.yaml deleted file mode 100644 index 0316ed6..0000000 --- a/.gitea/workflows/style_web.yaml +++ /dev/null @@ -1,56 +0,0 @@ -name: Code Style -- Web Components -run-name: 'Code Style -- Web Components -- ${{ gitea.repository }} ${{ gitea.ref_name }} ${{ gitea.sha }}' -on: - push: - branches: - - '*' - -jobs: - lint-check: - runs-on: ubuntu-latest - steps: - - name: Check Out Repository - uses: actions/checkout@v4 - - - name: Initialize Runner - uses: actions/setup-node@v4 - - - name: Install Linters - run: | - npm install --no-save \ - @eslint/eslintrc \ - @eslint/js \ - eslint \ - globals \ - html-validate \ - stylelint \ - stylelint-config-standard - - - name: Verify Linters - run: | - npx html-validate --version - npx stylelint --version - npx eslint --version - - - name: Run HTMLValidate - id: html_lint - run: npx html-validate --config dev_config/.htmlvalidate.json 'web/html/**/*' - - - name: Run Stylelint - id: style_lint - if: always() - run: npx stylelint --config dev_config/.stylelintrc.json --formatter verbose --fix 'web/css/**/*.css' - - - name: Run ESLint - id: js_lint - if: always() - env: - DEBUG: eslint:cli-engine - run: npx eslint --config dev_config/eslint.config.mjs --fix web/scripts/ - - - name: Verify Linters - if: > - steps.html_lint.outcome != 'success' || - steps.style_lint.outcome != 'success' || - steps.js_lint.outcome != 'success' - run: exit 1 \ No newline at end of file