From 2cbc22348ef038181e1dc89635a3be005604a4ca Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 12 Feb 2024 20:29:15 -0500 Subject: back to astro --- .github/workflows/ci.yaml | 70 +++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 32 deletions(-) (limited to '.github/workflows/ci.yaml') diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 11c4a50..28fd567 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,46 +6,52 @@ on: pull_request: workflow_dispatch: +env: + NODE_VERSION: 20 + jobs: - build: - name: Build + ci: + strategy: + matrix: + include: + - name: Build + command: build + - name: Lint + command: lint + + name: ${{ matrix.name }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Setup Deno - uses: nekowinston/setup-deno@v1 - - - name: Run build - run: | - deno task build - - format: - name: Format - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 + - name: Setup node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} - - name: Setup Deno - uses: nekowinston/setup-deno@v1 + - name: Setup pnpm + uses: pnpm/action-setup@v3 - - name: Run format + - name: Get pnpm store directory + id: store-path run: | - deno fmt --check - - lint: - name: Lint - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Setup Deno - uses: nekowinston/setup-deno@v1 + echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" + + - name: Setup pnpm cache + uses: actions/cache@v4 + env: + STORE_PATH: ${{ steps.store-path.outputs.STORE_PATH }} + 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 --frozen-lockfile - - name: Run lint + - name: Run ${{ matrix.command }} run: | - deno lint --compact || true - deno lint + pnpm run ${{ matrix.command }} -- cgit v1.2.3