chore: add ci #3
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: PR | |
on: | |
pull_request: | |
jobs: | |
test-server: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
if: ${{ !github.event.pull_request.draft }} | |
steps: | |
- uses: colpal/actions-clean@v1 | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: "1" # increment this to bust the cache if needed | |
- name: Run cargo test | |
run: cargo test | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
if: ${{ !github.event.pull_request.draft }} | |
steps: | |
- uses: colpal/actions-clean@v1 | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: "1" # increment this to bust the cache if needed | |
- name: Run cargo lint | |
run: cargo lint |