name: PR Auto-merge
on:
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Install taplo
uses: taiki-e/install-action@a37010ded18ff788be4440302bd6830b1ae50d8b with:
tool: taplo-cli
- name: Lint Cargo.toml
run: taplo lint Cargo.toml
- name: Check Cargo.toml formatting
run: taplo fmt --check --option reorder_keys=true Cargo.toml
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5
- name: Run cargo check
run: cargo check --all-features
- name: Run tests
run: cargo test --all-features
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Check formatting
run: cargo fmt -- --check
automerge:
runs-on: ubuntu-latest
needs: test
if: github.event.pull_request.user.login == 'renovate[bot]'
permissions:
contents: write
pull-requests: write
steps:
- name: automerge
uses: pascalgn/automerge-action@7961b8b5eec56cc088c140b56d864285eabd3f67 env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_LABELS: "automerge"