42 lines
1.1 KiB
YAML
Raw Normal View History

2024-11-19 20:53:57 +08:00
name: PR Check
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- '**'
workflow_dispatch:
jobs:
2024-11-28 17:10:46 +08:00
rust-pr-check:
2024-11-19 20:53:57 +08:00
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
2024-11-28 17:10:46 +08:00
- name: Checkout runner_tools
2024-11-19 20:53:57 +08:00
uses: actions/checkout@v4
with:
repository: StarCitizenToolBox/runner_tools
path: runner_tools
2024-11-28 17:10:46 +08:00
ref: v1.0.0
2024-11-19 20:53:57 +08:00
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
2024-11-28 17:10:46 +08:00
2024-11-19 20:53:57 +08:00
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
2024-11-28 17:10:46 +08:00
workspaces: "runner_tools/localization"
2024-11-19 20:53:57 +08:00
cache-all-crates: true
2024-11-28 17:10:46 +08:00
prefix-key: "rs_cache"
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
shared-key: "share"
2024-11-19 20:53:57 +08:00
- name: PR Check
2024-11-28 17:10:46 +08:00
env:
GH_REPO: ${{ github.repository }}
GH_PR_NUMBER: ${{ github.event.pull_request.id }}
GH_PR_TITLE: ${{ github.event.pull_request.title }}
run: cargo run --release --manifest-path ./runner_tools/localization/Cargo.toml -- -m pr_check