Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/hawken/node-github-action' into …
Browse files Browse the repository at this point in the history
…hawken/remove-circle
  • Loading branch information
hawkrives committed May 5, 2024
2 parents 3353085 + 6e49acb commit b8f8caa
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 175 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "master" ]
pull_request:
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]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test

lint:
runs-on: ubuntu-latest
strategy:
matrix:
# 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@v3
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 ]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run p
173 changes: 1 addition & 172 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"semi": false
},
"scripts": {
"p": "pretty-quick",
"p": "npm run pretty -- --no-write --check",
"pretty": "prettier --with-node-modules --write 'modules/**/*.js'",
"lint": "eslint --ignore-pattern '!modules/node_modules/*' --cache",
"start": "node -r dotenv/config ./modules/node_modules/@frogpond/ccc-server/index.js",
Expand Down Expand Up @@ -54,7 +54,6 @@
"devDependencies": {
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"prettier": "3.2.5",
"pretty-quick": "4.0.0"
"prettier": "3.2.5"
}
}

0 comments on commit b8f8caa

Please sign in to comment.