transmission-rpc/.github/workflows/ci.yml
2021-12-08 15:59:38 +01:00

54 lines
1.1 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@v2
- name: Get Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Setup Test Enviroment
run: docker-compose up -d
- name: Use Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cargo Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- name: Cargo Test
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo test -- --skip session_close
- name: Cargo Test Session Close
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo test -- session_close