Skip to content

Commit

Permalink
Merge branch 'main' of github.com:pH-7/giveit
Browse files Browse the repository at this point in the history
  • Loading branch information
pH-7 committed May 18, 2024
2 parents ba63985 + 1f738bf commit 3cc880d
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Tests

on: [push, pull_request]

jobs:
run:
runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
operating-system: ['ubuntu-latest']
node-version: [16.x, 18.x, 20.x, 22.x]

name: Node ${{ matrix.node-version }} on ${{ matrix.operating-system }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Check Node.js Version
run: node -v

- name: Check npm Version
run: npm -v

- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

0 comments on commit 3cc880d

Please sign in to comment.