my 0.4 suggestion: allow passing e.g. --user
args, don't use env-vars, refactor to struct
#88
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
name: Rust | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.rustup | |
/usr/local/cargo | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install Rust | |
run: rustup update stable | |
- name: Run rustfmt | |
run: cargo fmt --all -- --check | |
- name: Run clippy | |
run: cargo clippy --all -- -D warnings | |
- uses: taiki-e/install-action@nextest | |
- name: Cargo Test | |
run: cargo nextest run --all-features --no-capture --no-fail-fast | |
- name: auto-merge Dependabot | |
if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' | |
run: | | |
gh pr merge --merge $GITHUB_HEAD_REF | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |