mirror of
https://github.com/kristoferssolo/transmission-rpc.git
synced 2025-10-21 20:10:37 +00:00
47 lines
941 B
YAML
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
|