Integrational Tests

This commit is contained in:
Quang Ngô 2021-11-11 00:55:26 +07:00 committed by Aleksandr
parent 78c9980844
commit d2e95c5528
4 changed files with 43 additions and 1 deletions

5
.env Normal file
View File

@ -0,0 +1,5 @@
TURL=http://0.0.0.0:9091/transmission/rpc
TUSER=transmission
TPWD=transmission
RUST_LOG=info
TDIR=/downloads

View File

@ -10,15 +10,37 @@ 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

1
.gitignore vendored
View File

@ -1,5 +1,4 @@
/target
Cargo.lock
/.env
.idea/*
.vscode/*

16
docker-compose.yaml Normal file
View File

@ -0,0 +1,16 @@
---
version: "2.1"
services:
transmission:
image: lscr.io/linuxserver/transmission
container_name: transmission
environment:
- PUID=1000
- PGID=1000
- USER=transmission
- PASS=transmission
ports:
- 9091:9091
- 51413:51413
- 51413:51413/udp
restart: unless-stopped