ci: format

This commit is contained in:
Yujia Qiao 2022-02-06 22:09:13 +08:00
parent 81d85f6d7e
commit 9eee4fb05c
No known key found for this signature in database
GPG Key ID: DC129173B148701B
1 changed files with 29 additions and 29 deletions

View File

@ -2,9 +2,9 @@ name: Rust
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
concurrency:
# Documentation suggests ${{ github.head_ref }}, but that's only available on pull_request/pull_request_target triggers, so using ${{ github.ref }}.
@ -20,19 +20,19 @@ jobs:
name: Lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v1
- name: Clippy
run: cargo clippy -- -D warnings
- name: Setup cargo-hack
run: cargo install cargo-hack
- name: Check all features
run: cargo hack check --feature-powerset --no-dev-deps
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v1
- name: Clippy
run: cargo clippy -- -D warnings
- name: Setup cargo-hack
run: cargo install cargo-hack
- name: Check all features
run: cargo hack check --feature-powerset --no-dev-deps
build:
name: Build for ${{ matrix.target }}
@ -51,17 +51,17 @@ jobs:
target: x86_64-apple-darwin
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v1
- name: Build release
run: cargo build --release
- name: Run tests
run: cargo test --release --verbose
- uses: actions/upload-artifact@v2
with:
name: rathole-${{ matrix.target }}
path: target/release/${{ matrix.exe }}
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v1
- name: Build release
run: cargo build --release
- name: Run tests
run: cargo test --release --verbose
- uses: actions/upload-artifact@v2
with:
name: rathole-${{ matrix.target }}
path: target/release/${{ matrix.exe }}