Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
transport:
runs-on: ubuntu-latest
env:
TRANSPORT_RELEASE: v0.2.0
TRANSPORT_REV: 553bb45b8bfa3ac9c9f7ed1ad71a8ac19d384542
TRANSPORT_RELEASE: v0.3.0
TRANSPORT_REV: a447773203dc5e778e5f0ef0bccd255e70c29938
steps:
- uses: dtolnay/rust-toolchain@stable
- run: |
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
run: |
conformance="$GITHUB_WORKSPACE/transport-bin/transport-conformance"
for scenario in $("$conformance" list); do
SELECTIVE_FLAKE_FILE="$RUNNER_TEMP/flake-$scenario" "$conformance" run --scenario "$scenario" --transport "$SELECTIVE_TRANSPORT" \
SELECTIVE_FLAKE_FILE="$RUNNER_TEMP/flake-$scenario" "$conformance" run --scenario "$scenario" --require-features manifest_http --transport "$SELECTIVE_TRANSPORT" \
--client "php $GITHUB_WORKSPACE/bin/selective phpunit" --fixture-ids conformance.json
done

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vendor/bin/selective exec phpunit --filter testPass

`--debug` and `--log` belong to Selective and are not passed to PHPUnit (so PHPUnit's own `--debug` is not available through this command). `--debug` prints an error's backtrace instead of the support block, says when a reconnect waits, and treats an unknown server command as an error. `--log` writes every received command and sent response to `log/<runner id>.log`.

The sidecar is `transport --stdio`. The binary is `SELECTIVE_TRANSPORT` when set, which is also how to use a glibc build. Otherwise the client uses `~/.selective/transport/<release>/transport`, downloading it on first use: the release asset for the platform (`transport-Linux-x86_64.tar.gz`, the static musl build, on Linux) is fetched from GitHub releases, or from `SELECTIVE_TRANSPORT_RELEASES` when set, and used only if its sha256 matches the one pinned in `TransportBinary`. The pin is transport release `v0.2.0`, the first tag with `--stdio`. There is no Windows asset. The websocket URL is `SELECTIVE_TRANSPORT_URL` when set (used as given, plus any missing `test_map` and `remove_failed`, and `reconnect=true` on reconnect). Otherwise the client runs `transport --build-env` and builds the URL from that JSON. The URL and key stay in the child environment. They are not process arguments.
The sidecar is `transport --stdio`. The binary is `SELECTIVE_TRANSPORT` when set, which is also how to use a glibc build. Otherwise the client uses `~/.selective/transport/<release>/transport`, downloading it on first use: the release asset for the platform (`transport-Linux-x86_64.tar.gz`, the static musl build, on Linux) is fetched from GitHub releases, or from `SELECTIVE_TRANSPORT_RELEASES` when set, and used only if its sha256 matches the one pinned in `TransportBinary`. The pin is transport release `v0.3.0`. There is no Windows asset. The websocket URL is `SELECTIVE_TRANSPORT_URL` when set (used as given, plus any missing `test_map` and `remove_failed`, and `reconnect=true` on reconnect). Otherwise the client runs `transport --build-env` and builds the URL from that JSON. The URL and key stay in the child environment. They are not process arguments.

## What the session does

Expand All @@ -37,14 +37,14 @@ The transport's conformance runner, `transport-conformance`, drives this client
```bash
cd tests/fixtures/suite
for scenario in $(transport-conformance list); do
SELECTIVE_FLAKE_FILE=/tmp/flake-$scenario transport-conformance run --scenario "$scenario" --transport "$SELECTIVE_TRANSPORT" \
SELECTIVE_FLAKE_FILE=/tmp/flake-$scenario transport-conformance run --scenario "$scenario" --require-features manifest_http --transport "$SELECTIVE_TRANSPORT" \
--client "php $PWD/../../../bin/selective phpunit" --fixture-ids conformance.json
done
```

`php tests/harness/play.php` runs the unit suite plus the checks the transport scenarios do not cover: `--list-tests-xml` ids, class hooks re-entered per assigned id, and `stopOn*` forced off. It accepts `all`, `unit`, `list`, `hooks`, or `stops`.

The transport pin is `selectiveci/transport` release tag `v0.2.0`. CI builds `transport` and `transport-conformance` from the v0.2.0 commit with `cargo install --locked --git https://github.com/selectiveci/transport --rev 553bb45b8bfa3ac9c9f7ed1ad71a8ac19d384542 --bin transport --bin transport-conformance`, in a target directory used only for that commit; do not commit either binary. The fixture's `conformance.json` declares `before_all_seconds`, so `group_hook_time` runs against `PassTest`'s before-all hook.
The transport pin is `selectiveci/transport` release tag `v0.3.0`. CI builds `transport` and `transport-conformance` from the v0.3.0 commit with `cargo install --locked --git https://github.com/selectiveci/transport --rev a447773203dc5e778e5f0ef0bccd255e70c29938 --bin transport --bin transport-conformance`, in a target directory used only for that commit; do not commit either binary. The fixture's `conformance.json` declares `before_all_seconds`, so `group_hook_time` runs against `PassTest`'s before-all hook.

## Laravel

Expand Down
10 changes: 5 additions & 5 deletions src/TransportBinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

final class TransportBinary
{
public const RELEASE = 'v0.2.0';
public const RELEASE = 'v0.3.0';

public const SHA256 = [
'transport-Darwin-aarch64.tar.gz' => '7dcaec969378a181a62749673b9c0b658be17bf16a8880f5effbd8e03a6c4a17',
'transport-Darwin-x86_64.tar.gz' => 'ccb9f795086d5584ff605cff8aefc534a82cde3154a3231f7f9396cde27bf7d4',
'transport-Linux-aarch64.tar.gz' => 'cf54fbf596b8a708fbc64e031f98737f076b8c32c371a4506c8141c49bca84be',
'transport-Linux-x86_64.tar.gz' => '87b2d6847ed0efa44c73ec16526b85134bf6f2e3759d99f925682eaf1b27d937',
'transport-Darwin-aarch64.tar.gz' => 'dc5e7fff627041d304ab88aabb21bbdb167a56a21d71c38b2850fc52d6cccd3c',
'transport-Darwin-x86_64.tar.gz' => '5f491c35d150e6594b4a81070060600af6721a1b558e0cdd2c47712027bb7ed2',
'transport-Linux-aarch64.tar.gz' => '7ff36a36c78347de37154f6eb461f425b9c7f87b5387d0288162092c6f54090c',
'transport-Linux-x86_64.tar.gz' => '9a14ceee175a821977aedc69bfcbd9610ff369368a66274bdb64dbb5176bdc8d',
];

private const RELEASES = 'https://github.com/selectiveci/transport/releases/download';
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/TransportBinaryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testEveryReleaseAssetIsMappedAndPlatformsWithoutOneAreToldWhatTo
$this->assertSame('transport-Linux-aarch64.tar.gz', TransportBinary::asset('Linux', 'arm64'));
$this->assertSame('transport-Darwin-aarch64.tar.gz', TransportBinary::asset('Darwin', 'arm64'));
$this->assertSame('transport-Darwin-x86_64.tar.gz', TransportBinary::asset('Darwin', 'x86_64'));
$this->expectExceptionMessage('No transport is pinned for Windows-x86_64 in release v0.2.0');
$this->expectExceptionMessage('No transport is pinned for Windows-x86_64 in release v0.3.0');
TransportBinary::asset('Windows', 'AMD64');
}

Expand Down
Loading