mitigate linting issues #33
This file contains hidden or 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: Lifecycle | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_call: | |
| workflow_dispatch: | |
| jobs: | |
| delete-artifacts: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: kolpav/purge-artifacts-action@v1 | |
| with: | |
| token: ${{ secrets.PAT }} | |
| expire-in: 3days | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust with cache | |
| uses: ./.github/actions/setup-rust-with-cache | |
| - name: Build for Linux | |
| run: cargo build --release | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: godot-arch-linux-binary | |
| path: target/release/godot-arch | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust with cache | |
| uses: ./.github/actions/setup-rust-with-cache | |
| - name: Build for Windows | |
| run: cargo build --release | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: godot-arch-windows-binary | |
| path: target/release/godot-arch.exe | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust with cache | |
| uses: ./.github/actions/setup-rust-with-cache | |
| with: | |
| components: rustfmt, clippy | |
| - name: Check formatting | |
| run: cargo fmt --check | |
| - name: Run clippy | |
| run: cargo clippy -- -D warnings | |
| - name: Build release | |
| run: cargo build --release | |
| - name: Run tests | |
| run: cargo test | |
| - name: Check documentation | |
| run: cargo doc --no-deps |