Keyword escaping related fixes #36
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: | |
| tags: | |
| - "v*.*.*" | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: v1-rust | |
| shared-key: debug | |
| cache-all-crates: true | |
| - name: Setup Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Install moonbit | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash -s -- 0.6.19 | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: Bundle core MoonBit library | |
| run: moon bundle --target wasm | |
| working-directory: core | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| - name: Clippy | |
| run: cargo clippy -- -Dwarnings | |
| - name: Build | |
| run: cargo build --all-features --all-targets | |
| test: | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: v1-rust | |
| shared-key: debug | |
| cache-all-crates: false | |
| - name: Setup Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - uses: cargo-bins/cargo-binstall@main | |
| - name: Install wasmtime-cli | |
| run: cargo binstall --force --locked [email protected] | |
| - name: Install moonbit | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash -s -- 0.6.19 | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: Bundle core MoonBit library | |
| run: moon bundle --target wasm | |
| working-directory: core | |
| - name: Tests | |
| run: cargo test -p moonbit-component-generator -- --nocapture --report-time --format junit --logfile target/report.xml --test-threads=1 | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v5 | |
| if: success() || failure() # always run even if the previous step fails | |
| with: | |
| report_paths: "**/target/report-*.xml" | |
| detailed_summary: true | |
| include_passed: true | |
| publish: | |
| needs: [test] | |
| if: "startsWith(github.ref, 'refs/tags/v')" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Install moonbit | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash -s -- 0.6.19 | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: Bundle core MoonBit library | |
| run: moon bundle --target wasm | |
| working-directory: core | |
| - id: get_version | |
| uses: battila7/get-version-action@v2 | |
| - name: Publish crates | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: | | |
| export VERSION="${{ steps.get_version.outputs.version-without-v }}" | |
| sed -i "s/0.0.0/$VERSION/g" Cargo.toml | |
| cargo publish -p moonbit-component-generator --all-features --allow-dirty |