mirror of
https://github.com/revanced/revanced-discord-bot.git
synced 2025-04-29 22:14:28 +02:00
ci: matrix run on stable and nightly, add clippy and cache (#1)
This commit is contained in:
parent
740d5b5f39
commit
3a6d81ba1d
47
.github/workflows/rust.yml
vendored
47
.github/workflows/rust.yml
vendored
@ -2,18 +2,55 @@ name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
branches:
|
||||
- main
|
||||
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
rust: [stable, nightly]
|
||||
|
||||
name: ${{ matrix.rust }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
id: rust-toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
components: clippy
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
id: cache
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry/cache/
|
||||
target/
|
||||
key: ${{ matrix.rust }}-${{ steps.rust-toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: cargo build
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
|
||||
- name: cargo clippy
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: --no-deps -- -D warnings
|
||||
|
Loading…
x
Reference in New Issue
Block a user