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

chore: change CI workflow to avoid caching issues #159

Merged
merged 2 commits into from
Nov 10, 2023
Merged
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
37 changes: 24 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,41 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [18]
node: [18, 20]

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 3

- name: Use latest version of Node.js
- name: Set NodeJS
uses: actions/setup-node@v4
with:
node-version: "*"
node-version: ${{ matrix.node }}
cache: 'pnpm'

- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/[email protected]
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: true
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
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: Run pnpm install dependencies
run: pnpm install

- run: pnpm --version

Expand Down Expand Up @@ -117,4 +128,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir: playwright-report
publish_dir: ./playwright-report
publish_dir: ./playwright-report