feat: use file exclusive lock to prevent start instance twice #34
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 Build and Test | |
on: | |
merge_group: | |
types: [checks_requested] | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
# Run the workflow on every push to the main branch | |
- 'src/**' | |
- 'Cargo.toml' | |
- '.github/workflows/**' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# run on ubuntu, macos and windows | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
toolchain: | |
- nightly | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose |