Add RPM and PyPI example plugins, restructure as workspace #14
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| check: | |
| name: Lint & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-wasip2 | |
| components: rustfmt, clippy | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Format check | |
| run: cargo fmt --check | |
| - name: Clippy (WASM target) | |
| run: cargo clippy --target wasm32-wasip2 --workspace -- -D warnings | |
| - name: Unit tests (host target) | |
| run: cargo test --target x86_64-unknown-linux-gnu --workspace | |
| - name: Build WASM plugins | |
| run: cargo build --release --target wasm32-wasip2 --workspace | |
| - name: Upload Unity plugin | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unity-format-plugin | |
| path: target/wasm32-wasip2/release/unity_format_plugin.wasm | |
| - name: Upload RPM plugin | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpm-format-plugin | |
| path: target/wasm32-wasip2/release/rpm_format_plugin.wasm | |
| - name: Upload PyPI plugin | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pypi-format-plugin | |
| path: target/wasm32-wasip2/release/pypi_format_plugin.wasm | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarqube-scan-action@v5 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |