Jan 13 balance patch #2154
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: 'Test: All CI Tests' | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize, ready_for_review] | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| NODE_VERSION: 20 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| test: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up PNPM | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Cache Rust Output | |
| id: rust-output-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| wasm_module/pkg | |
| wasm_module/target | |
| key: rust-output-${{ env.NODE_VERSION }}-${{ hashFiles('wasm_module', '**/pnpm-lock.yaml') }} | |
| restore-keys: rust-output- | |
| - name: Cache Rust Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: wasm_module | |
| if: steps.rust-output-cache.outputs.cache-hit != 'true' | |
| # fixes error[E0463]: can't find crate for `core` | |
| # reason: unknown. see: https://stackoverflow.com/a/77852953 | |
| - name: Remove pre-installed Rust | |
| run: rustup self uninstall -y | |
| if: steps.rust-output-cache.outputs.cache-hit != 'true' | |
| - name: Reinstall Rust | |
| run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| if: steps.rust-output-cache.outputs.cache-hit != 'true' | |
| - name: Compile Rust | |
| run: pnpm wasm | |
| if: steps.rust-output-cache.outputs.cache-hit != 'true' | |
| - name: Test modifier and preset data | |
| run: pnpm testData | |
| - name: Validate modifier and preset data types | |
| run: pnpm validateDataTypes | |
| - name: Lint with ESLint | |
| run: pnpm eslint | |
| - name: Format with prettier | |
| run: pnpm prettierCheck | |
| - name: Typecheck with tsc | |
| run: pnpm typeCheck |