name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
rustup default 1.91
rustup component add rustfmt clippy rust-docs
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 - uses: taiki-e/install-action@ae532dedd825648efd18d9c49c9a443d0398ca0a - uses: taiki-e/install-action@f4bce5a5d906fb2b4cb0e9ca76076d078ada2cf5 - run: cargo make fmt-check
- run: cargo make clippy
- run: cargo deny check
- run: cargo make docs
test:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
services:
jaeger:
image: jaegertracing/all-in-one:1.35
env:
COLLECTOR_OTLP_ENABLED: "true"
COLLECTOR_OTLP_HTTP_HOST_PORT: 55681
ports:
- 16685:16685
- 55681:55681
steps:
- run: sudo echo "127.0.0.1 jaeger" | sudo tee -a /etc/hosts
- uses: actions/checkout@v4
- run: rustup default 1.91
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 - uses: taiki-e/install-action@ae532dedd825648efd18d9c49c9a443d0398ca0a - uses: taiki-e/install-action@82cdcb96475386706489efb01e3807dcc36ea360 - run: cargo make test
alls-green:
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
runs-on: ubuntu-latest
needs:
- lint
- test
steps:
- run: ${{ !contains(needs.*.result, 'failure') }}