Skip to content

Merge pull request #43 from jmillerv/2023-10-13-data #79

Merge pull request #43 from jmillerv/2023-10-13-data

Merge pull request #43 from jmillerv/2023-10-13-data #79

Workflow file for this run

name: Node.js CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
# Create the package in the pipeline because if a package-lock.json is included, it interferes with the
# DigitalOcean deploy and makes it more complex.
- name: Create package.json
run: |
echo '{
"name": "aphor",
"version": "1.0.0",
"description": "Randomly displays a single quote from a json collection",
"scripts": {
"test": "jest"
},
"devDependencies": {
"@babel/core": "^7.21.4",
"@babel/preset-env": "^7.21.4",
"babel-jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-fetch-mock": "^3.0.3",
"node-fetch": "^2.6.9"
}
}' > package.json
- name: Install dependencies
run: npm i --package-lock-only && npm ci
- name: Install Jest
run: npm install --save-dev jest
- name: Run tests
run: npm test