Skip to content

move module code to src #55

move module code to src

move module code to src #55

Workflow file for this run

name: Chai - Build/Test/Deploy
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build-test-chai:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install MoonBit
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> "$GITHUB_PATH"
"$HOME/.moon/bin/moon" version --all
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache-dependency-path: |
tests/package-lock.json
src/examples/showcase/package-lock.json
- name: Install npm dependencies for 'tests'
working-directory: tests
run: npm ci
- name: Install Moonbit dependencies
run: moon update
- name: Type check
run: make check
- name : Cache Playwright browsers
id: cache-playwright
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('tests/package-lock.json') }}
- name: Install Playwright browsers
working-directory: tests
run: npx playwright install chromium --with-deps
- name: Build and Test
run: make test
- name: Install showcase dependencies
working-directory: src/examples/showcase
run: npm ci
- name: Build showcase
working-directory: src/examples/showcase
run: npm run build
- uses: actions/upload-pages-artifact@v3
with:
path: src/examples/showcase/dist
deploy:
needs: build-test-chai
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4