From 999e0eb45290c515449fba601055e0fbb4ce7b26 Mon Sep 17 00:00:00 2001 From: "Jan T. Sott" Date: Wed, 24 Apr 2024 23:36:00 +0200 Subject: [PATCH] update workflow --- .github/workflows/tests.yml | 78 ++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4877126..ef06f30 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,62 +6,60 @@ on: - '.github/**' - 'src/**' - 'tests/**' + - 'types/**' - 'package.json' - 'pnpm-lock.yaml' pull_request: - paths: - - '.github/**' - - 'src/**' - - 'tests/**' - - 'package.json' - - 'pnpm-lock.yaml' + paths: + - '.github/**' + - 'src/**' + - 'tests/**' + - 'types/**' + - 'package.json' + - 'pnpm-lock.yaml' workflow_dispatch: jobs: - tests: - runs-on: ${{ matrix.os }} + default: + runs-on: ubuntu-latest strategy: + fail-fast: false matrix: node-version: ['lts/*', '*'] - os: [ubuntu-latest] steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 10 - - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} + - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 + with: + node-version: ${{ matrix.node-version }} - - uses: pnpm/action-setup@v2.0.1 - name: Install pnpm - id: pnpm-install - with: - version: 8 - run_install: false + - name: Enable Corepack + run: corepack enable - - name: Get pnpm store directory - id: pnpm-cache - run: | - echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_store_path::$(pnpm store path)" - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_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 --strict-peer-dependencies + - name: Install dependencies + run: pnpm install --frozen-lockfile --strict-peer-dependencies - - name: Lint Source - run: pnpm run --if-present lint + - name: Lint Source + run: pnpm run --if-present lint - - name: Build Source - run: pnpm run --if-present build + - name: Build Source + run: pnpm run --if-present build - - name: Run Tests - run: pnpm run --if-present test + - name: Run Tests + run: pnpm run --if-present test