From ee10ffbc114121571346d7204c98f8abc7ebf000 Mon Sep 17 00:00:00 2001 From: Doug Richar Date: Thu, 4 Apr 2024 04:05:45 -0400 Subject: [PATCH] ci(ui): add GitHub Actions CI workflow --- .github/workflows/ci-ui.yaml | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/ci-ui.yaml diff --git a/.github/workflows/ci-ui.yaml b/.github/workflows/ci-ui.yaml new file mode 100644 index 00000000..e513a936 --- /dev/null +++ b/.github/workflows/ci-ui.yaml @@ -0,0 +1,60 @@ +name: CI Workflow (UI) + +on: + push: + branches: [ dev, main ] + pull_request: + branches: [ dev, main ] + +jobs: + run-ci: + name: Lint, Typecheck, Test, and Build + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install --filter ./ui + + - name: Lint + run: pnpm run lint --filter ./ui + + - name: Prettier + run: pnpm run prettier --filter ./ui + + - name: Typecheck + run: pnpm run typecheck --filter ./ui + + - name: Run tests + run: pnpm run test --filter ./ui + + - name: Build + run: pnpm run build --filter ./ui