ci: add CI

This commit is contained in:
fryorcraken.eth 2022-09-05 21:07:25 +10:00
parent 657c1806c9
commit c311903acf
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
2 changed files with 55 additions and 4 deletions

48
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: CI
on:
push:
branches:
- "master"
pull_request:
env:
NODE_JS: 16
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test:
[
predefined-prod,
predefined-test,
native-wss-prod,
native-wss-test,
waku-connect,
]
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_JS }}
- uses: bahmutov/npm-install@v1
with:
install-command: yarn
- name: Run ${{ matrix.test }}
run: npm run ${{ matrix.test }}
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_JS }}
- uses: bahmutov/npm-install@v1
with:
install-command: yarn
- run: npm run test:lint
- run: npm run test:prettier

View File

@ -3,9 +3,12 @@
"packageManager": "yarn@3.2.0",
"type": "module",
"scripts": {
"lint": "eslint . --ext .js --fix",
"format": "prettier --write .",
"fix": "run-s lint format",
"fix": "run-s fix:**",
"fix:lint": "eslint . --ext .js --fix",
"fix:prettier": "prettier --write .",
"test": "run-s test:*",
"test:lint": "eslint . --ext .js",
"test:prettier": "prettier . --list-different",
"predefined-prod": "mocha predefinedProdFleet.js --exit",
"predefined-test": "mocha predefinedTestFleet.js --exit ",
"native-wss-prod": "mocha nativeWssProdFleet.js --exit",
@ -55,6 +58,6 @@
},
"lint-staged": {
"*.js": "eslint --cache --fix",
"*.{js,css,md}": "prettier --write"
"*.{js,css,md,yml}": "prettier --write"
}
}