mirror of
https://github.com/kristoferssolo/transmission-rpc.git
synced 2025-10-21 20:10:37 +00:00
67 lines
1.4 KiB
YAML
67 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build_and_test:
|
|
name: Rust project
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Get Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
components: rustfmt, clippy
|
|
|
|
- name: Check formatting
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
- name: Cargo check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --workspace --all-targets --all-features
|
|
|
|
- name: Build
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
|
|
- name: Setup Test Enviroment
|
|
run: docker-compose up -d
|
|
|
|
- name: Cargo Test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: -- --skip session_close
|
|
|
|
- name: Cargo Test Session Close
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: -- session_close
|
|
|
|
- name: Cargo clippy
|
|
uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --all-features
|
|
|
|
- name: Cargo audit
|
|
uses: actions-rs/audit-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|