Further CI improvements #237
Workflow file for this run
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: Bridge CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'bridge/**' | |
- '.github/workflows/bridge-ci.yml' | |
pull_request: | |
paths: | |
- 'bridge/**' | |
- '.github/workflows/bridge-ci.yml' | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
test-versions: | |
name: Webhook Bridge CI | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, beta] | |
steps: | |
- uses: actions/checkout@master | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "bridge -> target" | |
- name: rustfmt | |
run: cargo fmt -- --check | |
working-directory: bridge | |
- name: Install dependencies | |
# Packages should align with whatever is in the bridge/Dockerfile | |
run: | | |
sudo apt-get install -y \ | |
build-essential=12.* \ | |
checkinstall=1.* \ | |
curl \ | |
libssl-dev=* \ | |
pkg-config=0.29.* \ | |
protobuf-compiler=* \ | |
zlib1g-dev=1:* | |
- name: Build | |
run: cargo build --locked | |
working-directory: bridge | |
- name: Start dependencies | |
run: docker-compose -f "bridge/testing-docker-compose.yml" up -d | |
- name: Clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
working-directory: bridge | |
- name: Run tests | |
working-directory: bridge | |
run: ./run-tests.sh | |
- name: Stop dependencies | |
run: docker-compose -f "bridge/testing-docker-compose.yml" down | |
# deny-check: | |
# name: cargo-deny check | |
# runs-on: ubuntu-latest | |
# continue-on-error: ${{ matrix.checks == 'advisories' }} | |
# strategy: | |
# matrix: | |
# checks: | |
# - advisories | |
# - bans licenses sources | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: EmbarkStudios/cargo-deny-action@v1 | |
# with: | |
# command: check ${{ matrix.checks }} | |
# arguments: --all-features --manifest-path axum/Cargo.toml |