18: Add bors r=JoelWachsler a=JoelWachsler



Co-authored-by: Joel Wachsler <JoelWachsler@users.noreply.github.com>
This commit is contained in:
bors[bot] 2022-07-11 14:37:27 +00:00 committed by GitHub
commit baabb5157b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 57 additions and 13 deletions

View File

@ -1,17 +1,25 @@
name: CI name: CI
on: on:
push: push:
branches: branches: [main, staging, trying]
- '**' pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs: jobs:
test: test:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
services: services:
# Needed for tests to pass # Needed for tests to pass
qbittorrent: qbittorrent:
image: linuxserver/qbittorrent:4.4.3 image: linuxserver/qbittorrent:4.4.3
ports: ports:
- 8080:8080 - 8080:8080
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -27,14 +35,21 @@ jobs:
profile: minimal profile: minimal
override: true override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose
- name: Run tests - name: Run tests
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: test command: test
args: --workspace args: --workspace --verbose
fmt: fmt:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -52,7 +67,8 @@ jobs:
args: --all -- --check args: --all -- --check
clippy: clippy:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -1,13 +1,19 @@
name: Extra name: Extra
on: on:
push: push:
branches: branches:
- main - main
env:
CARGO_TERM_COLOR: always
jobs: jobs:
# Need to have the same name as where this dependency is used, # Need to have the same name as where this dependency is used,
# otherwise the cache key won't be the same. # otherwise the cache key won't be the same.
release: release:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
# build and cache this here in order to reuse it's cache in feature branches # build and cache this here in order to reuse it's cache in feature branches
- name: Install cargo-edit - name: Install cargo-edit

View File

@ -1,13 +1,20 @@
name: Publish name: Publish
on: on:
push: push:
branches: branches:
- 'main' - main
env:
CARGO_TERM_COLOR: always
jobs: jobs:
tag: tag:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
outputs: outputs:
should_publish: ${{ steps.create-and-push-tag.outputs.should_publish }} should_publish: ${{ steps.create-and-push-tag.outputs.should_publish }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -32,9 +39,11 @@ jobs:
echo "The result is: ${{ steps.create-and-push-tag.outputs.should_publish }}" echo "The result is: ${{ steps.create-and-push-tag.outputs.should_publish }}"
publish: publish:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
needs: tag needs: tag
if: ${{ needs.tag.outputs.should_publish == 'true' }} if: ${{ needs.tag.outputs.should_publish == 'true' }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -1,11 +1,18 @@
name: Prepare new release name: Prepare new release
on: on:
create: create:
branches: branches:
env:
CARGO_TERM_COLOR: always
jobs: jobs:
release: release:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/heads/create_release/')" if: "startsWith(github.ref, 'refs/heads/create_release/')"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

6
bors.toml Normal file
View File

@ -0,0 +1,6 @@
delete_merged_branches = true
update_base_for_deletes = true
status = [
"test"
]

View File

@ -17,7 +17,7 @@ async fn main() -> Result<()> {
const TORRENT_URL: &str = "http://www.legittorrents.info/download.php?id=5cc013e801095be61d768e609e3039da58616fd0&f=Oddepoxy%20-%20Oddepoxy%20(2013)%20[OGG%20320%20CBR].torrent"; const TORRENT_URL: &str = "http://www.legittorrents.info/download.php?id=5cc013e801095be61d768e609e3039da58616fd0&f=Oddepoxy%20-%20Oddepoxy%20(2013)%20[OGG%20320%20CBR].torrent";
let _ = api.torrent_management().add(TORRENT_URL).send().await?; let _ = api.torrent_management().add(TORRENT_URL).send().await?;
let mut tries = 5; let mut tries = 10;
while tries > 0 { while tries > 0 {
let info = api.torrent_management().info().send().await?; let info = api.torrent_management().info().send().await?;
if let Some(first) = &info.get(0) { if let Some(first) = &info.get(0) {

View File

@ -17,7 +17,7 @@ async fn main() -> Result<()> {
const TORRENT_URL: &str = "http://www.legittorrents.info/download.php?id=5cc013e801095be61d768e609e3039da58616fd0&f=Oddepoxy%20-%20Oddepoxy%20(2013)%20[OGG%20320%20CBR].torrent"; const TORRENT_URL: &str = "http://www.legittorrents.info/download.php?id=5cc013e801095be61d768e609e3039da58616fd0&f=Oddepoxy%20-%20Oddepoxy%20(2013)%20[OGG%20320%20CBR].torrent";
let _ = api.torrent_management().add(TORRENT_URL).send().await?; let _ = api.torrent_management().add(TORRENT_URL).send().await?;
let mut tries = 5; let mut tries = 10;
while tries > 0 { while tries > 0 {
let info = api.torrent_management().info().send().await?; let info = api.torrent_management().info().send().await?;
if let Some(first) = &info.get(0) { if let Some(first) = &info.get(0) {