Skip to content

Release 0.9.1 (#19) #71

Release 0.9.1 (#19)

Release 0.9.1 (#19) #71

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
jobs:
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
- name: cargo clippy with default features (tls)
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets -- -D warnings
- name: cargo clippy with rustls feature
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --features rustls --no-default-features -- -D warnings
- name: cargo clippy without default features
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --no-default-features -- -D warnings
test:
runs-on: ubuntu-latest
needs: clippy
steps:
- uses: actions/checkout@v1
- 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/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: >-
curl -sL https://api.github.com/repos/3proxy/3proxy/releases/latest |
jq -r ".assets[].browser_download_url | select(endswith(\"x86_64.deb\"))" |
xargs wget
- run: sudo dpkg -i *.deb
- run: nohup cat .github/workflows/proxy.cfg | 3proxy &
- uses: actions-rs/cargo@v1
with:
command: build
args: --all-targets
- name: Test with default features (tls)
run: RUST_BACKTRACE=1 timeout 10 cargo test --all-targets -- --test-threads=1
- uses: actions-rs/cargo@v1
with:
command: build
args: --all-targets --features rustls --no-default-features
- name: Test with rustls feature
run: RUST_BACKTRACE=1 timeout 10 cargo test --all-targets --features rustls --no-default-features -- --test-threads=1
coverage:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: >-
curl -sL https://api.github.com/repos/3proxy/3proxy/releases/latest |
jq -r ".assets[].browser_download_url | select(endswith(\"x86_64.deb\"))" |
xargs wget
- run: sudo dpkg -i *.deb
- run: nohup cat .github/workflows/proxy.cfg | 3proxy &
- run: cargo install grcov
- uses: allenevans/[email protected]
with:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: >-
-Zprofile
-Ccodegen-units=1
-Cinline-threshold=0
-Clink-dead-code
-Coverflow-checks=off
-Cpanic=abort
-Zpanic_abort_tests
RUSTDOCFLAGS: >-
-Zprofile
-Ccodegen-units=1
-Cinline-threshold=0
-Clink-dead-code
-Coverflow-checks=off
-Cpanic=abort
-Zpanic_abort_tests
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-targets --no-fail-fast
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-targets --no-fail-fast --features rustls --no-default-features
- uses: actions-rs/[email protected]
id: coverage
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} #required
file: ${{ steps.coverage.outputs.report }}
fail_ci_if_error: true