ic
ic copied to clipboard
feat: release fixtures
To get better coverage on upgrades, we want to run some tests on fixtures produced by the mainnet version. Here's the basic workflow:
- There's a CI-generated bazel file called
release_fixtures.bzlthat contains the metadata about where the fixtures are uploaded and what their sha256 sum is - Based on this file we generate a bunch of
http_filerules in WORKSPACE.bazel, one for each fixture, that can then be used in tests - There's a
rust_fixture_generatorrule that essentialy defines a Rust binary that produces a fixture (on stdout) and generates the fixture out of it - There's an
upload_fixturesrule (defined inuploads.bzland invoked inpublish/fixtures/BUILD.bazel) that takesrust_fixture_generator(defined infixtures.bzl) rules as inputs, and uploads their generated files usingupload_artifacts, also producing a newrelease_fixtures.bzl - There is a GitHub CI job (currently defined in
.github/workflows/preview-fixtures.yml- should rename once finalized) that's meant to be run on releases, that will triggerupload_fixtures, take the newrelease_fixtures.bzlfile, and then create a PR to update this file on master. Currently the PR will need a manual approval, but we will want to switch this to be automatically merged once we're confident it works (and we figure out how to do this)