Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for running GitHub Actions locally. #279

Merged
merged 7 commits into from
Oct 27, 2024
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/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ jobs:
cp -p bazel/cargo/Cargo.Bazel.lock Cargo.lock
cargo audit

example:
examples:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -433,7 +433,7 @@ jobs:
--mode validate \
-c envoy.yaml

reactor:
reactors:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -475,7 +475,7 @@ jobs:
run: |
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
chmod +x ./rustup-init.sh
./rustup-init.sh -y
./rustup-init.sh -y --default-toolchain nightly
rm rustup-init.sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

Expand Down
32 changes: 32 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Development

## Testing

GitHub Actions can be executed locally using the [`act`] tool.

All tests can be executed using:

act

Individual tests can be executed using `-j` and `--matrix` parameters, e.g.:

act -j bazel
act -j stable
act -j nightly
act -j examples --matrix example:http_auth_random

By default, all jobs are cached in `~/.cache/actcache`. This can be disabled
using the `--no-cache-server` parameter.

## Updating Bazel dependencies

When adding or updating Cargo dependencies, the existing Bazel `BUILD` files
must be regenerated using the [`bazelisk`] tool:

```sh
bazelisk run //bazel/cargo:crates_vendor -- --repin all
```


[`act`]: https://github.com/nektos/act
[`bazelisk`]: https://github.com/bazelbuild/bazelisk
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
- [Extending Envoy with WASM and Rust](https://antweiss.com/blog/extending-envoy-with-wasm-and-rust/)
PiotrSikora marked this conversation as resolved.
Show resolved Hide resolved
- [Writing Envoy filters in Rust with WebAssembly](https://content.red-badger.com/resources/extending-istio-with-rust-and-webassembly)

## Updating dependencies
## Contributing changes

When updating dependencies, you need to regenerate Bazel `BUILD` files to match updated `Cargo.toml`:

```sh
bazel run //bazel/cargo:crates_vendor -- --repin all
```
See [CONTRIBUTING.md](./CONTRIBUTING.md) and [DEVELOPMENT.md](./DEVELOPMENT.md) files.
Loading