v0.6.0 #190
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
name: CI | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: generate-lockfile | |
- name: Cache cargo registry | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/registry | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-registry- | |
- name: Cache cargo index | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/git | |
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-index- | |
- name: Cache cargo build | |
uses: actions/cache@v1 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-build-target- | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --tests | |
- name: Download 3proxy | |
run: | | |
curl https://api.github.com/repos/3proxy/3proxy/releases/latest | | |
grep -wo "https.*x86_64\.deb" | | |
xargs curl -L -o 3proxy.deb | |
- run: sudo dpkg -i 3proxy.deb | |
- run: sudo apt install -f | |
- run: nohup cat .github/workflows/proxy.cfg | 3proxy & | |
- run: nohup cat .github/workflows/proxy_auth.cfg | 3proxy & | |
- run: RUST_BACKTRACE=1 timeout 10 cargo test --all --all-features -- --test-threads=1 | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
components: rustfmt | |
- name: cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- run: rustup component add clippy | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-targets --all-features -- -D warnings |