Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add basic test #1

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

# Controls when the action will run.
on:
# Triggers the workflow on pull request events but only for the main branch
pull_request:
branches: [main]

push:
branches: [main]

merge_group:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# ======== test ========
mac:
# run ut in MacOS, as SWC cases will fail in Ubuntu CI
runs-on: macos-14
strategy:
matrix:
node-version: [18.x]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10

- name: Install Pnpm
run: corepack enable

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install Dependencies
run: pnpm install

- name: Build Test
run: |
pnpm run test:sandboxes-build
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"packageManager": "[email protected]",
"scripts": {
"prepare": "pnpm run build && simple-git-hooks",
"build": "pnpm --parallel --filter \"./packages/**\" run prep --optimized",
"build": "pnpm --filter \"./packages/**\" run prep --optimized",
"dev": "pnpm --parallel --filter \"./packages/**\" run prep --watch",
"check": "pnpm --parallel --filter \"./packages/**\" run check",
"test:sandboxes-build": "pnpm --parallel --filter \"./sandboxes/**\" run build:storybook"
Expand Down