This repository was archived by the owner on Nov 22, 2025. It is now read-only.
Merge pull request #157 from senkenn/dependabot/npm_and_yarn/glob-13.0.0 #187
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| lint: | |
| name: Lint & Format (Biome) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup | |
| - name: Biome check (lint + format) | |
| run: pnpm biome check | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| needs: [lint] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup | |
| - name: Build | |
| run: pnpm build:pkg | |
| env: | |
| BUILD: dev | |
| - run: pnpm -r test | |
| e2e-test: | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| needs: [lint] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup | |
| - name: Build | |
| run: pnpm build:pkg | |
| env: | |
| BUILD: dev | |
| - run: xvfb-run -a pnpm test:e2e | |
| if: runner.os == 'Linux' | |
| - run: pnpm test:e2e | |
| if: runner.os != 'Linux' | |
| all-checks-passed: | |
| name: All Checks Passed | |
| runs-on: ubuntu-latest | |
| needs: [lint, unit-test, e2e-test] | |
| if: always() | |
| steps: | |
| - name: Check if all required jobs succeeded | |
| run: | | |
| # lint is always required | |
| if [[ "${{ needs.lint.result }}" != "success" ]]; then | |
| echo "❌ lint failed or was skipped" | |
| exit 1 | |
| fi | |
| # unit-test is required only for pull requests | |
| if [[ "${{ github.event_name }}" == "pull_request" && "${{ needs.unit-test.result }}" != "success" ]]; then | |
| echo "❌ unit-test failed or was skipped" | |
| exit 1 | |
| fi | |
| # e2e-test is always required | |
| if [[ "${{ needs.e2e-test.result }}" != "success" ]]; then | |
| echo "❌ e2e-test failed or was skipped" | |
| exit 1 | |
| fi | |
| echo "✅ All required checks passed!" | |
| dependabot-auto-merge: | |
| runs-on: ubuntu-latest | |
| if: github.actor == 'dependabot[bot]' | |
| needs: [all-checks-passed] | |
| steps: | |
| - name: Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@v2 | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Enable auto-merge for Dependabot PRs | |
| if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' | |
| run: gh pr merge --auto --merge "$PR_URL" | |
| env: | |
| PR_URL: ${{github.event.pull_request.html_url}} | |
| GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |