diff --git a/.gitea/workflows/quality-gate.yml b/.gitea/workflows/quality-gate.yml index 248df0a..22bc368 100644 --- a/.gitea/workflows/quality-gate.yml +++ b/.gitea/workflows/quality-gate.yml @@ -1,4 +1,74 @@ -component-tests: +name: CI + +on: + push: + branches: + - '**' + pull_request: + branches: [dev, main] + +jobs: + lint-and-format: + runs-on: ubuntu-docker-dind + container: + image: git.byting-pandas.ninja/ci/node22-docker:latest + credentials: + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + steps: + - uses: actions/checkout@v4 + + - run: corepack enable + - run: corepack prepare pnpm@11.11.0 --activate + + - run: pnpm install --frozen-lockfile + + - name: Lint + run: pnpm lint + + - name: Check formatting + run: pnpm format:check + + changeset-check: + runs-on: ubuntu-docker-dind + container: + image: git.byting-pandas.ninja/ci/node22-docker:latest + credentials: + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - run: corepack enable + - run: corepack prepare pnpm@11.11.0 --activate + + - run: pnpm install --frozen-lockfile + + - name: Verify changeset exists + continue-on-error: true + run: pnpm changeset status --since=origin/dev + + unit-tests: + runs-on: ubuntu-docker-dind + container: + image: git.byting-pandas.ninja/ci/node22-docker:latest + credentials: + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + steps: + - uses: actions/checkout@v4 + + - run: corepack enable + - run: corepack prepare pnpm@11.11.0 --activate + + - run: pnpm install --frozen-lockfile + + - name: Run unit tests + run: pnpm test:unit + + component-tests: runs-on: ubuntu-docker-dind container: image: git.byting-pandas.ninja/ci/node22-docker:latest @@ -16,5 +86,10 @@ component-tests: - run: pnpm install --frozen-lockfile + - name: Verify Docker availability + run: | + docker --version + docker compose version + - name: Run component tests (Docker) run: pnpm test:component \ No newline at end of file