Skip to content

Commit

Permalink
updates workflow to use npm
Browse files Browse the repository at this point in the history
  • Loading branch information
micheleriva authored Feb 24, 2024
1 parent e5d6a6a commit 270161b
Showing 1 changed file with 29 additions and 16 deletions.
45 changes: 29 additions & 16 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,38 @@ name: Node.js CI

on:
push:
branches: [ "main" ]
branches: ['main']
pull_request:
branches: [ "main" ]
types: [opened, synchronize]

jobs:
build:

name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

env:
ORAMA_SECURE_PROXY_API_KEY_TEST: ${{ secrets.ORAMA_SECURE_PROXY_API_KEY_TEST }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm run build --if-present
- run: npm test
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- uses: pnpm/action-setup@v2
with:
version: latest

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Build
run: pnpm build

- name: Test
run: pnpm test

0 comments on commit 270161b

Please sign in to comment.