chore: only change content when content-type is HTML #43
This file contains 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: CI main | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
RUST_BACKTRACE: 1 | |
jobs: | |
test: | |
name: Cargo test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
rust: [stable] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
target: wasm32-wasip1 | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt, clippy | |
- name: Run cargo check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
- name: Run library tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --lib | |
- name: Run integration tests | |
env: | |
LOG_LEVEL: off | |
run: | | |
cd example | |
cargo build --target wasm32-wasip1 | |
docker compose up --detach | |
# Wait for Envoy to start | |
for i in {1..10}; do | |
curl -f http://localhost:10000/healthcheck && break || sleep 5 | |
done | |
cargo test --test request-e2e | |
docker compose down | |
- name: Run clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets --verbose | |
- name: Verify code format | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --target wasm32-wasip1 --release |