name: Pull Request
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
on:
pull_request:
branches:
- "main"
env:
PROJECT_NAME: http-server-rs
jobs:
test:
name: ๐งช Test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: cargo test
format:
name: ๐ Format
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: cargo install cargo-xfmt
- run: cargo xfmt --check
lint:
name: ๐ค Lint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: cargo clippy --all-targets --workspace -- -D warnings