transmission-rpc/.github/workflows/ci.yml
2021-11-16 09:22:12 +01:00

47 lines
941 B
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/cargo@v1
with:
command: test