diff --git a/.gitea/workflows/compliance.yml b/.gitea/workflows/compliance.yml index 341bb6d103..2fb39dc7ec 100644 --- a/.gitea/workflows/compliance.yml +++ b/.gitea/workflows/compliance.yml @@ -2,6 +2,7 @@ name: PR Compliance on: push: branches: ["ci/**"] + jobs: lint-backend: runs-on: ubuntu-latest @@ -12,11 +13,60 @@ jobs: go-version-file: go.mod check-latest: true - run: make deps-backend deps-tools - - name: lint-go - run: make lint-go + - run: make lint-backend env: TAGS: bindata sqlite sqlite_unlock_notify - lint-frontend: + + lint-go-windows: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + - run: make deps-backend deps-tools + - run: make lint-go-windows lint-go-gitea-vet + env: + TAGS: bindata sqlite sqlite_unlock_notify + GOOS: windows + GOARCH: amd64 + + lint-go-gogit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + - run: make deps-backend deps-tools + - run: make lint-go + env: + TAGS: bindata gogit sqlite sqlite_unlock_notify + + checks-backend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + - run: make deps-backend deps-tools + - run: make --always-make checks-backend + + lint-spell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + - run: make lint-spell + + frontend: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -27,9 +77,107 @@ jobs: cache: pnpm cache-dependency-path: pnpm-lock.yaml - run: make deps-frontend - - name: lint-js - run: make lint-js - - name: lint-css - run: make lint-css - - name: test-frontend - run: make test-frontend + - run: make lint-frontend + - run: make checks-frontend + - run: make test-frontend + - run: make frontend + + lint-json: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + - run: make deps-frontend + - run: make lint-json + + lint-swagger: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + - run: make deps-frontend + - run: make lint-swagger + + lint-yaml: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + - run: uv python install 3.12 + - run: make deps-py + - run: make lint-yaml + + lint-templates: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + - run: uv python install 3.12 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + - run: make deps-py + - run: make deps-frontend + - run: make lint-templates + + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + - run: make deps-frontend + - run: make lint-md + + backend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + - run: make deps-backend + - run: go build -o gitea_no_gcc + - name: build-backend-arm64 + run: make backend + env: + GOOS: linux + GOARCH: arm64 + TAGS: bindata gogit + - name: build-backend-windows + run: go build -o gitea_windows + env: + GOOS: windows + GOARCH: amd64 + TAGS: bindata gogit + - name: build-backend-386 + run: go build -o gitea_linux_386 + env: + GOOS: linux + GOARCH: 386 + + actions: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + - run: make lint-actions