Skip to content

CI

CI #198

Workflow file for this run

---
name: CI
'on':
pull_request:
push:
branches:
- master
schedule:
- cron: "0 2 * * 0"
jobs:
node-test:
name: Node Test
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
- name: Set up Node.js.
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies.
run: npm install
- name: Run app.
run: |
cp example.config.json config.json
nohup node server.js &
- name: Test '/' path.
run: >
curl -s localhost:8080
- name: Test 'current' path.
run: >
curl -s localhost:8080/current | grep "1"
- name: Test 'up' path.
run: >
curl -s localhost:8080/up | grep "New value: 2"
- name: Test 'down' path.
run: >
curl -s localhost:8080/down | grep "New value: 1"