diff --git a/.github/workflows/container-qa.yml b/.github/workflows/container-qa.yml deleted file mode 100644 index 1ee08be0a..000000000 --- a/.github/workflows/container-qa.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: QA Container - -on: - pull_request: - push: - branches: - - "**" - - "!main" - -jobs: - qa-devcontainer: - # We don't need to run this on Renovate PRs. We will already test the `renovate/foo` branch. - if: github.event_name != 'pull_request' || github.actor != 'renovate[bot]' - name: 🔹 QA Devcontainer - uses: oliversalzburg/workflows/.github/workflows/qa-nodejs-oci.yml@main - with: - containerfile: packages/devcontainer/Containerfile - working-directory: packages/devcontainer - qa-ksa-backend: - # We don't need to run this on Renovate PRs. We will already test the `renovate/foo` branch. - if: github.event_name != 'pull_request' || github.actor != 'renovate[bot]' - name: 🔹 QA Backend - uses: oliversalzburg/workflows/.github/workflows/qa-nodejs-oci.yml@main - with: - containerfile: packages/kitten-analysts/backend.Containerfile - working-directory: packages/kitten-analysts - qa-ksa-game: - # We don't need to run this on Renovate PRs. We will already test the `renovate/foo` branch. - if: github.event_name != 'pull_request' || github.actor != 'renovate[bot]' - name: 🔹 QA Game - uses: oliversalzburg/workflows/.github/workflows/qa-nodejs-oci.yml@main - with: - containerfile: packages/kitten-analysts/game.Containerfile - working-directory: packages/kitten-analysts - qa-ksa-ui: - # We don't need to run this on Renovate PRs. We will already test the `renovate/foo` branch. - if: github.event_name != 'pull_request' || github.actor != 'renovate[bot]' - name: 🔹 QA UI - uses: oliversalzburg/workflows/.github/workflows/qa-nodejs-oci.yml@main - with: - containerfile: packages/kitten-analysts/ui.Containerfile - working-directory: packages/kitten-analysts diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml new file mode 100644 index 000000000..b93f7ff0e --- /dev/null +++ b/.github/workflows/qa.yml @@ -0,0 +1,113 @@ +name: QA + +on: + pull_request: + push: + +jobs: + qa-commit: + # We don't need to run this on Renovate PRs. We will already test the `renovate/foo` branch. + if: github.event_name != 'pull_request' || github.actor != 'renovate[bot]' + name: QA Commit + permissions: + contents: read + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + + - name: Validate commit messages + uses: oliversalzburg/action-commit-validator@3d55a588a712a905f073a6a6b1cdeb7af8a37c41 # v0.0.10 + if: github.event_name == 'pull_request' + with: + accept_breaking_changes: false + accept_emoji: false + accepted_scopes: | + bonfire + religion + science + space + time + trade + village + workshop + + api + build + container + core + deps + deps-dev + filters + i18n + schema + settings + ui + accepted_types: | + chore + ci + docs + feat + fix + refactor + test + repo_token: ${{ secrets.GITHUB_TOKEN }} + + qa: + # We don't need to run this on Renovate PRs. We will already test the `renovate/foo` branch. + if: github.event_name != 'pull_request' || github.actor != 'renovate[bot]' + name: 🔹 QA + uses: oliversalzburg/workflows/.github/workflows/qa-browser-app.yml@main + + qa-devcontainer: + # We don't need to run this on Renovate PRs. We will already test the `renovate/foo` branch. + if: github.event_name != 'pull_request' || github.actor != 'renovate[bot]' + name: 🔹 QA Devcontainer + uses: oliversalzburg/workflows/.github/workflows/qa-nodejs-oci.yml@main + with: + containerfile: packages/devcontainer/Containerfile + working-directory: packages/devcontainer + qa-ksa-backend: + # We don't need to run this on Renovate PRs. We will already test the `renovate/foo` branch. + if: github.event_name != 'pull_request' || github.actor != 'renovate[bot]' + name: 🔹 QA Backend + uses: oliversalzburg/workflows/.github/workflows/qa-nodejs-oci.yml@main + with: + containerfile: packages/kitten-analysts/backend.Containerfile + working-directory: packages/kitten-analysts + qa-ksa-game: + # We don't need to run this on Renovate PRs. We will already test the `renovate/foo` branch. + if: github.event_name != 'pull_request' || github.actor != 'renovate[bot]' + name: 🔹 QA Game + uses: oliversalzburg/workflows/.github/workflows/qa-nodejs-oci.yml@main + with: + containerfile: packages/kitten-analysts/game.Containerfile + working-directory: packages/kitten-analysts + qa-ksa-ui: + # We don't need to run this on Renovate PRs. We will already test the `renovate/foo` branch. + if: github.event_name != 'pull_request' || github.actor != 'renovate[bot]' + name: 🔹 QA UI + uses: oliversalzburg/workflows/.github/workflows/qa-nodejs-oci.yml@main + with: + containerfile: packages/kitten-analysts/ui.Containerfile + working-directory: packages/kitten-analysts + + qa-passed: + needs: + - qa-commit + - qa + - qa-devcontainer + - qa-ksa-backend + - qa-ksa-game + - qa-ksa-ui + name: QA Passed + if: always() + runs-on: ubuntu-22.04 + steps: + - name: Failure + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + - name: Success + if: ${{ success() && !(contains(needs.*.result, 'failure')) }} + run: exit 0 diff --git a/.github/workflows/userscript-qa.yml b/.github/workflows/userscript-qa.yml deleted file mode 100644 index fd4664779..000000000 --- a/.github/workflows/userscript-qa.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: QA - -on: - pull_request: - push: - -jobs: - qa: - name: Run QA - runs-on: ubuntu-22.04 - permissions: - contents: read - - steps: - - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - - - name: Validate commit messages - uses: oliversalzburg/action-commit-validator@3d55a588a712a905f073a6a6b1cdeb7af8a37c41 # v0.0.10 - if: github.event_name == 'pull_request' - with: - accept_breaking_changes: false - accept_emoji: false - accepted_scopes: | - bonfire - religion - science - space - time - trade - village - workshop - - api - build - container - core - deps - deps-dev - filters - i18n - schema - settings - ui - accepted_types: | - chore - ci - docs - feat - fix - refactor - test - repo_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Select NodeJS version - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 - env: - # renovate: datasource=docker depName=node versioning=node - NODE_VERSION: "20.17.0" - with: - node-version: ${{ env.NODE_VERSION }} - - run: yarn install --immutable - - - run: yarn build:all - - run: yarn lint:all - - run: yarn test:all - - run: yarn kitten-scientists:build