Skip to content

Doc update readme http grpc crate #212

Doc update readme http grpc crate

Doc update readme http grpc crate #212

Workflow file for this run

name: Pull Request
on:
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
unit-test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cargo home
id: cargo-home
run: echo "path=${CARGO_HOME:-~/.cargo}" >>"$GITHUB_OUTPUT"
- uses: actions/cache@v4
with:
path: |
target
${{ steps.cargo-home.outputs.path }}
key: cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Setup grpc for tests
run: ./dev/server/grpc/scripts/setup.sh
- run: cargo test --all
- run: cargo test --all --no-default-features --features=json
- run: cargo test --all --no-default-features --features=yaml
- run: cargo test --all --no-default-features --features=json --features=yaml
- run: cargo test --all --no-default-features --features=json --features=yaml --features=cli
- run: cargo clippy --all --tests -- --deny warnings
- run: cargo fmt --all --check
- run: clang-format ./dev/server/grpc/proto/*.proto --dry-run --Werror
- run: RUSTDOCFLAGS="-D warnings" cargo doc --all --no-deps
- run: cargo install cargo-rdme && cargo rdme --check
e2e-test:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cargo home
id: cargo-home
run: echo "path=${CARGO_HOME:-~/.cargo}" >>"$GITHUB_OUTPUT"
- uses: actions/cache@v4
with:
path: |
target
${{ steps.cargo-home.outputs.path }}
key: cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Run develop http server (actual)
uses: ./.github/actions/run-develop-http-server
with:
port: 3001
- name: Run develop http server (expect)
uses: ./.github/actions/run-develop-http-server
with:
port: 3000
- name: Run examples e2e test and comment on pull request
run: |
set -euo pipefail
{
cargo run --manifest-path relentless-http/Cargo.toml --features cli -- \
-f relentless-http/examples/config/assault.yaml relentless-http/examples/config/compare.yaml -d actual=http://localhost:3000 \
-s testcases repeats -r github-markdown \
--no-color --ng-only
} >> target/report.txt
- name: Run configs e2e test and comment on pull request
run: |
set -euo pipefail
{
cargo run --manifest-path relentless-http/Cargo.toml --features cli -- \
-f tests/config/basic/*.yaml -d actual=http://localhost:3001 \
-s testcases repeats -r github-markdown \
--no-color --ng-only
} >> target/report.txt
- name: Comment on pull request
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr comment ${{ github.event.number }} --body-file target/report.txt
version:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Check version in Cargo.toml and git tag
uses: ./.github/actions/versions
id: detect-version
- name: Add label
if: steps.detect-version.outputs.should-release == 'true'
run: |
gh pr edit ${{ github.event.pull_request.number }} --add-label "release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}