chore(main): release 0.115.4 #830
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: CI | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| changes: | |
| name: Detect changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| code: ${{ steps.filter.outputs.code }} | |
| docker: ${{ steps.filter.outputs.docker }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| predicate-quantifier: 'every' | |
| filters: | | |
| code: | |
| - '**' | |
| - '!*.md' | |
| - '!**/*.md' | |
| - '!docs/**' | |
| - '!decisions/**' | |
| docker: | |
| - 'test/docker/**' | |
| static-analysis: | |
| name: Static analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install | |
| - name: Validate commit messages | |
| run: bunx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} | |
| - name: Lint | |
| run: bun run lint | |
| - name: Typecheck | |
| run: bun run typecheck | |
| - name: Check circular dependencies | |
| run: bun run cycles | |
| - name: Validate version stamping | |
| run: | | |
| bun run scripts/set-version.ts | |
| VERSION=$(grep -oP 'ARB_VERSION = "\K[^"]+' src/version.ts) | |
| if [[ -z "$VERSION" ]]; then | |
| echo "::error::set-version.ts produced an empty version" | |
| exit 1 | |
| fi | |
| echo "Version stamp OK: $VERSION" | |
| git checkout src/version.ts | |
| unit-tests: | |
| name: Unit tests | |
| needs: changes | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Skip (no code changes) | |
| if: needs.changes.outputs.code != 'true' | |
| run: echo "No code changes detected, skipping tests" | |
| - uses: actions/checkout@v4 | |
| if: needs.changes.outputs.code == 'true' | |
| - uses: oven-sh/setup-bun@v2 | |
| if: needs.changes.outputs.code == 'true' | |
| - name: Configure git | |
| if: needs.changes.outputs.code == 'true' | |
| run: | | |
| git config --global user.name "CI" | |
| git config --global user.email "ci@localhost" | |
| - run: bun install | |
| if: needs.changes.outputs.code == 'true' | |
| - name: Unit tests | |
| if: needs.changes.outputs.code == 'true' | |
| run: bun run test | |
| integration: | |
| name: Integration tests (${{ matrix.os }}) | |
| needs: changes | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Skip (no code changes) | |
| if: needs.changes.outputs.code != 'true' | |
| run: echo "No code changes detected, skipping tests" | |
| - uses: actions/checkout@v4 | |
| if: needs.changes.outputs.code == 'true' | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@v2 | |
| if: needs.changes.outputs.code == 'true' | |
| - name: Configure git | |
| if: needs.changes.outputs.code == 'true' | |
| run: | | |
| git config --global user.name "CI" | |
| git config --global user.email "ci@localhost" | |
| - run: bun install | |
| if: needs.changes.outputs.code == 'true' | |
| - name: Build | |
| if: needs.changes.outputs.code == 'true' | |
| run: bun run build | |
| - name: Integration tests | |
| if: needs.changes.outputs.code == 'true' | |
| run: | | |
| if [ "${{ matrix.os }}" = "macos-latest" ]; then | |
| bun test test/integration/macos.test.ts --concurrent --timeout 30000 | |
| else | |
| bun test test/integration/ --concurrent --timeout 30000 | |
| fi | |
| integration-git217: | |
| name: Integration tests (git 2.17) | |
| needs: changes | |
| if: needs.changes.outputs.code == 'true' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Compute image tag | |
| id: tag | |
| run: | | |
| HASH=$(cat test/docker/git217.Dockerfile test/docker/entrypoint.sh | sha256sum | cut -c1-16) | |
| echo "hash=$HASH" >> "$GITHUB_OUTPUT" | |
| - name: Pull pre-built image | |
| id: pull | |
| if: needs.changes.outputs.docker != 'true' | |
| continue-on-error: true | |
| run: | | |
| docker pull "ghcr.io/${{ github.repository }}/git217:${{ steps.tag.outputs.hash }}" | |
| docker tag "ghcr.io/${{ github.repository }}/git217:${{ steps.tag.outputs.hash }}" arb-git217:latest | |
| - name: Set up Docker Buildx | |
| if: needs.changes.outputs.docker == 'true' || steps.pull.outcome == 'failure' | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| if: needs.changes.outputs.docker == 'true' || steps.pull.outcome == 'failure' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: test/docker/ | |
| file: test/docker/git217.Dockerfile | |
| tags: arb-git217:latest | |
| load: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Integration tests (git 2.17) | |
| run: docker run --rm -v "$PWD":/app -w /app arb-git217 |