Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script renames and formatting changes #751

Merged
merged 4 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ name: Node.js CI

on:
push:
branches: [ "master" ]
branches: ['master']
pull_request:
branches: [ "master" ]
branches: ['master']

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [ 22.x ]
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -33,22 +33,22 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm test
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm test

smoke-test-stolaf:
runs-on: ubuntu-latest
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [ 22.x ]
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -58,14 +58,14 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run test-stolaf-college
- run: npm run test:stolaf-college

smoke-test-carleton:
runs-on: ubuntu-latest
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [ 22.x ]
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -75,7 +75,7 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run test-carleton-college
- run: npm run test:carleton-college

lint:
runs-on: ubuntu-latest
Expand All @@ -84,21 +84,21 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint

format:
runs-on: ubuntu-latest
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [ 22.x ]
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
},
"scripts": {
"build": "rm -rf ./dist ./.tsbuildinfo && tsc",
"build-watch": "tsc --watch",
"build:watch": "tsc --watch",
"p": "npm run pretty -- --no-write --check",
"pretty": "prettier --write source",
"pretty": "prettier --write source scripts",
"lint": "eslint --cache --max-warnings=0 .",
"start": "node dist/source/ccc-server/index.js",
"start-watch": "node --watch dist/source/ccc-server/index.js",
"start:watch": "node --watch dist/source/ccc-server/index.js",
"stolaf-college": "env INSTITUTION=stolaf-college npm start",
"carleton-college": "env INSTITUTION=carleton-college npm start",
"test-stolaf-college": "./scripts/smoke-test.sh stolaf-college",
"test-carleton-college": "./scripts/smoke-test.sh carleton-college",
"test:stolaf-college": "./scripts/smoke-test.sh stolaf-college",
"test:carleton-college": "./scripts/smoke-test.sh carleton-college",
"test": "ava",
"watch": "node ./scripts/watch.js"
},
Expand Down
10 changes: 5 additions & 5 deletions scripts/watch.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {spawn} from 'child_process'

const buildWatch = spawn('npm', ['run', 'build-watch'], {stdio: 'inherit'})
const startWatch = spawn('npm', ['run', 'start-watch'], {stdio: 'inherit'})
const buildWatch = spawn('npm', ['run', 'build:watch'], {stdio: 'inherit'})
const startWatch = spawn('npm', ['run', 'start:watch'], {stdio: 'inherit'})

const shutdown = () => {
buildWatch.kill()
startWatch.kill()
process.exit()
buildWatch.kill()
startWatch.kill()
process.exit()
}

process.on('SIGINT', shutdown)
Expand Down