Skip to content

Commit 78d2489

Browse files
PiotrSikoraSwaagie
authored andcommitted
Add instructions for running GitHub Actions locally. (proxy-wasm#279)
While there, rename example and reactor jobs to their plural forms. Signed-off-by: Piotr Sikora <[email protected]>
1 parent c3bbf23 commit 78d2489

File tree

3 files changed

+37
-9
lines changed

3 files changed

+37
-9
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ jobs:
353353
cp -p bazel/cargo/Cargo.Bazel.lock Cargo.lock
354354
cargo audit
355355
356-
example:
356+
examples:
357357
runs-on: ubuntu-latest
358358

359359
strategy:
@@ -434,7 +434,7 @@ jobs:
434434
--mode validate \
435435
-c envoy.yaml
436436
437-
reactor:
437+
reactors:
438438
runs-on: ubuntu-latest
439439

440440
strategy:
@@ -477,7 +477,7 @@ jobs:
477477
run: |
478478
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
479479
chmod +x ./rustup-init.sh
480-
./rustup-init.sh -y
480+
./rustup-init.sh -y --default-toolchain nightly
481481
rm rustup-init.sh
482482
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
483483

DEVELOPMENT.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Development
2+
3+
## Testing
4+
5+
GitHub Actions can be executed locally using the [`act`] tool.
6+
7+
All tests can be executed using:
8+
9+
act
10+
11+
Individual tests can be executed using `-j` and `--matrix` parameters, e.g.:
12+
13+
act -j bazel
14+
act -j stable
15+
act -j nightly
16+
act -j examples --matrix example:http_auth_random
17+
18+
By default, all jobs are cached in `~/.cache/actcache`. This can be disabled
19+
using the `--no-cache-server` parameter.
20+
21+
## Updating Bazel dependencies
22+
23+
When adding or updating Cargo dependencies, the existing Bazel `BUILD` files
24+
must be regenerated using the [`bazelisk`] tool:
25+
26+
```sh
27+
bazelisk run //bazel/cargo:crates_vendor -- --repin all
28+
```
29+
30+
31+
[`act`]: https://github.com/nektos/act
32+
[`bazelisk`]: https://github.com/bazelbuild/bazelisk

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
- [Extending Envoy with WASM and Rust](https://antweiss.com/blog/extending-envoy-with-wasm-and-rust/)
3030
- [Writing Envoy filters in Rust with WebAssembly](https://content.red-badger.com/resources/extending-istio-with-rust-and-webassembly)
3131

32-
## Updating dependencies
32+
## Contributing changes
3333

34-
When updating dependencies, you need to regenerate Bazel `BUILD` files to match updated `Cargo.toml`:
35-
36-
```sh
37-
bazel run //bazel/cargo:crates_vendor -- --repin all
38-
```
34+
See [CONTRIBUTING.md](./CONTRIBUTING.md) and [DEVELOPMENT.md](./DEVELOPMENT.md) files.

0 commit comments

Comments
 (0)