Update WASM path #109
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: CI | |
env: | |
RUST_TOOLCHAIN: nightly-2024-01-01-x86_64-unknown-linux-gnu | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ['*'] | |
workflow_dispatch: | |
jobs: | |
typecheck: | |
name: 'Typecheck' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install wasm-pack | |
run: | | |
rustup toolchain install $RUST_TOOLCHAIN | |
rustup component add rust-src --toolchain $RUST_TOOLCHAIN | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Install packages | |
run: npm install | |
- name: Build rust | |
run: npm run build --rust | |
- name: Typecheck | |
run: npm run typecheck | |
test: | |
name: 'Test: engine' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install wasm-pack | |
run: | | |
rustup toolchain install $RUST_TOOLCHAIN | |
rustup component add rust-src --toolchain $RUST_TOOLCHAIN | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Install packages | |
run: npm install | |
- name: Test | |
run: npm run test | |
e2e: | |
name: 'Test: e2e' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install wasm-pack | |
run: | | |
rustup toolchain install $RUST_TOOLCHAIN | |
rustup component add rust-src --toolchain $RUST_TOOLCHAIN | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Install packages | |
run: npm install | |
- name: Install playwright | |
run: npx playwright install | |
- name: Test | |
run: npm run e2e | |
eslint: | |
name: 'Lint: eslint' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install packages | |
run: npm install | |
- name: Lint | |
run: npm run lint:eslint | |
rustfmt: | |
name: 'Lint: rustfmt' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Lint | |
run: npm run lint:rustfmt | |
deploy: | |
name: Deploy | |
needs: [typecheck, test, e2e, eslint, rustfmt] | |
if: ${{ github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to Render | |
uses: johnbeynon/[email protected] | |
with: | |
service-id: ${{ secrets.RENDER_SERVICE_ID }} | |
api-key: ${{ secrets.RENDER_API_KEY }} |