Skip to content

Switch to Vitest

Switch to Vitest #296

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/install
- name: Packages
run: pnpm build
- name: Examples
run: pnpm --filter "./examples/**" --parallel build
bundlesize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm bundlesize
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm check
examples:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm -rc --filter="./examples/**" exec -- pwd | awk -F/ '{print $NF}' > TMP_EXAMPLES.txt
- name: Generate Examples Comment
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
run: >
{
echo "**The latest updates to examples.**";
echo "";
echo "| Name | StackBlitz |";
echo "|:---------|:------------|";
while IFS= read -r id || [[ -n "$id" ]];
do echo "| **$id** | [Visit StackBlitz](https://stackblitz.com/github/joe-bell/cva/tree/${BRANCH}/examples/${id}) |";
done;
} < TMP_EXAMPLES.txt > TMP_EXAMPLES.md
- uses: marocchino/sticky-pull-request-comment@v2
with:
header: "Examples"
recreate: true
path: TMP_EXAMPLES.md
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm lint
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm prettier --check .
syncpack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm syncpack
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/install
- run: pnpm test -- run --coverage