Merge branch 'main' of https://github.com/dimensionhq/infralink #36
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: [push] | |
jobs: | |
linux: | |
name: Linux Pipeline | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Toolchain Install | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Cargo Format | |
run: cargo fmt --all | |
- name: Cargo Clippy | |
run: cargo clippy --fix --allow-staged --allow-dirty | |
- name: Commit & Push changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git commit -m "refactor(ci): better formatting & clippy fixes" || echo "No changes to commit" | |
git push | |
windows: | |
name: Windows Pipeline | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Toolchain Install | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Cargo Format | |
run: cargo fmt --all | |
- name: Cargo Clippy | |
run: cargo clippy | |
macos: | |
name: MacOS Pipeline | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Toolchain Install | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Cargo Format | |
run: cargo fmt --all | |
- name: Cargo Clippy | |
run: cargo clippy |