Skip to content

Commit

Permalink
Test new config
Browse files Browse the repository at this point in the history
  • Loading branch information
dcadenas committed Dec 21, 2023
1 parent 3991f81 commit 31c8665
Showing 1 changed file with 36 additions and 32 deletions.
68 changes: 36 additions & 32 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
- push
- pull_request

jobs:
build:

cache-and-install:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Run build script
run: pnpm run build --if-present
- name: Run tests
run: pnpm test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
fail_ci_if_error: true
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 16

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- 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: Install dependencies
run: pnpm install

0 comments on commit 31c8665

Please sign in to comment.