diff --git a/.env b/.env new file mode 100644 index 0000000..c412aa5 --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +TURL=http://0.0.0.0:9091/transmission/rpc +TUSER=transmission +TPWD=transmission +RUST_LOG=info +TDIR=/downloads diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17e6962..0d9ca51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.gitignore b/.gitignore index 476c8dd..68a863f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /target Cargo.lock -/.env .idea/* .vscode/* diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..03c398b --- /dev/null +++ b/docker-compose.yaml @@ -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