Skip to content

test error solved

test error solved #32

Workflow file for this run

# .github/workflows/ci.yml
name: CI for Express TypeScript App
# Trigger this workflow on every push or pull request to the main branch
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
# Define the environment to run this job on
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x', '20.x']
# Steps for the job
steps:
# Step 1: Checkout the code
- name: Checkout code
uses: actions/checkout@v4
# Step 2: Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
# Step 3: Install dependencies
- name: Install dependencies
run: npm install
# Step 4: Build the TypeScript code
- name: Build project
run: npm run build
# Step 5: Run tests (we haven't added any tests yet, so this will skip)
- name: Run tests
run: npm test