Skip to content

[PKD-11]: Add test to CI/CD #9

[PKD-11]: Add test to CI/CD

[PKD-11]: Add test to CI/CD #9

Workflow file for this run

name: Node.js CI Workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
install_dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Cache Node Modules
uses: actions/cache@v3
with:
path: |
node_modules
.yarn/cache
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: yarn
run_tests:
runs-on: ubuntu-latest
needs: install_dependencies
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Restore Node Modules Cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run Tests
run: yarn jest