feat: block selection policy #74
Workflow file for this run
This file contains hidden or 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: Websocket Proxy CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "./websocket-proxy" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Redis for tests | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y redis | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run build | |
run: cargo build | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
- name: Run clippy | |
run: cargo clippy -- -D warnings | |
- name: Run tests | |
run: cargo test --all-features | |
- name: Check for common mistakes | |
run: cargo check | |
docker: | |
name: Docker Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: false | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |