feat(gitignore): do not ignore check outputs the upstream reads from the committed repo #3711
Workflow file for this run
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: E2E Tests on Cross-Platform | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: &paths-ignore | |
| - "**/*.md" | |
| - "images/**" | |
| - ".devcontainer/**" | |
| - ".vscode/**" | |
| - ".zed/**" | |
| - "LICENSE" | |
| - "cspell.json" | |
| - ".cspellcache" | |
| - ".secretlintrc.json" | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: *paths-ignore | |
| permissions: | |
| contents: read # Required for checking out code | |
| jobs: | |
| build: | |
| name: Build binaries | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup mise | |
| uses: jdx/mise-action@9e7f7633ff6f6d6048a9418a68d48f288f50eb14 # v4.2.3 | |
| with: | |
| experimental: true | |
| - name: Install dependencies | |
| # Bun is not supported by the setup action. The tracked .npmrc still | |
| # routes this installation through Takumi Guard. | |
| run: bun install | |
| - name: Build binaries | |
| run: | | |
| mkdir -p dist-bun | |
| bun build --compile --minify --sourcemap --target=bun-linux-x64 --outfile=dist-bun/rulesync-linux-x64 ./src/cli/index.ts | |
| bun build --compile --minify --sourcemap --target=bun-linux-arm64 --outfile=dist-bun/rulesync-linux-arm64 ./src/cli/index.ts | |
| bun build --compile --minify --sourcemap --target=bun-darwin-arm64 --outfile=dist-bun/rulesync-darwin-arm64 ./src/cli/index.ts | |
| bun build --compile --minify --sourcemap --target=bun-darwin-x64 --outfile=dist-bun/rulesync-darwin-x64 ./src/cli/index.ts | |
| bun build --compile --minify --sourcemap --target=bun-windows-x64 --outfile=dist-bun/rulesync-windows-x64.exe ./src/cli/index.ts | |
| - name: Cache binaries | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: dist-bun | |
| key: rulesync-binaries-${{ github.sha }} | |
| enableCrossOsArchive: true | |
| e2e: | |
| name: E2E Test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| needs: build | |
| strategy: | |
| # Keep every platform leg running even if one fails, so a single | |
| # platform-specific breakage does not mask the others' results. | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Restore cached binaries | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: dist-bun | |
| key: rulesync-binaries-${{ github.sha }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Make binary executable (Unix) | |
| if: runner.os != 'Windows' | |
| env: | |
| MATRIX_OS: ${{ matrix.os }} | |
| run: | | |
| if [ "$MATRIX_OS" = "ubuntu-latest" ]; then | |
| chmod +x dist-bun/rulesync-linux-x64 | |
| BINARY_PATH=dist-bun/rulesync-linux-x64 | |
| elif [ "$MATRIX_OS" = "macos-latest" ]; then | |
| # macos-latest is Apple Silicon (arm64) | |
| chmod +x dist-bun/rulesync-darwin-arm64 | |
| BINARY_PATH=dist-bun/rulesync-darwin-arm64 | |
| else | |
| echo "Unexpected matrix OS for Unix binary selection: $MATRIX_OS" >&2 | |
| exit 1 | |
| fi | |
| echo "BINARY_PATH=$BINARY_PATH" >> "$GITHUB_ENV" | |
| - name: Set binary path (Windows) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| echo "BINARY_PATH=dist-bun/rulesync-windows-x64.exe" >> "$GITHUB_ENV" | |
| - name: Setup mise | |
| uses: jdx/mise-action@9e7f7633ff6f6d6048a9418a68d48f288f50eb14 # v4.2.3 | |
| with: | |
| experimental: true | |
| - name: Setup Takumi Guard npm registry | |
| uses: flatt-security/setup-takumi-guard-npm@9a5d797c2085b6326d3a2985c08e3a114b9b88c1 # v1 | |
| - name: Install dependencies | |
| run: pnpm install --ignore-scripts | |
| - name: Test binary | |
| env: | |
| RULESYNC_CMD: ${{ env.BINARY_PATH }} | |
| run: pnpm test:e2e |