fix: performance concerns in the git plugin's contributors_for_commit #646
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: Hipcheck | |
# Run on both PRs and pushes to the main branch. | |
# It may seem redundant to run tests on main, since we disallow pushing directly | |
# to main and all PRs get tested before merging. | |
# | |
# But due to how GitHub Actions isolates caches, we need to run the tests on | |
# main so that caches are available to new PRs. The caches created when testing | |
# PR code cannot be re-used outside of testing that PR. | |
# | |
# See the GitHub Actions documentation here: | |
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "config/**" | |
- "hipcheck/**" | |
- "plugins/**" | |
- "xtask/**" | |
pull_request: | |
branches: [main] | |
paths: | |
- "config/**" | |
- "hipcheck/**" | |
- "plugins/**" | |
- "xtask/**" | |
permissions: | |
contents: read | |
env: | |
RUSTFLAGS: -Dwarnings | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
name: "Test (${{ matrix.os }})" | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
steps: | |
# Get the repo, get Rust, get `cargo-nextest`, setup caching. | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: taiki-e/install-action@nextest | |
- uses: swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
# Install the protobuf compiler | |
- if: runner.os == 'Linux' | |
run: sudo apt-get install -y protobuf-compiler | |
- if: runner.os == 'macOS' | |
run: brew install protobuf | |
- if: runner.os == 'Windows' | |
run: choco install protoc | |
# Print dependency info (useful for debugging) | |
- name: Dependency Tree | |
run: cargo tree | |
# Try building every crate in the workspace. | |
# Note that this actually runs "cargo check" and doesn't attempt | |
# to link the resulting artifacts together. | |
- name: Build | |
run: cargo check --verbose --workspace | |
# Test the code. | |
- name: Test | |
run: cargo nextest r --verbose --workspace | |
# Run the linter. | |
- name: Lint | |
run: cargo clippy --verbose --workspace | |
# Run our own checks for licensing and other info. | |
- name: Check | |
run: cargo xtask check |