Fix PR check action (#2447)

* fix

* Install all dependencies

* Fix PR check action

* Fix lint

* Update install.sh and remove pretty check
This commit is contained in:
Bruce Berrios 2022-02-08 16:17:26 -05:00 committed by GitHub
parent ccafcee72d
commit c8af14baab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 22 deletions

20
.github/pr-check.yml vendored
View file

@ -1,20 +0,0 @@
name: PR Check
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: "16.13.2"
- run: npm ci
- run: npm run pretty
- run: npm run lint

View file

@ -17,4 +17,3 @@ jobs:
node-version: "16.13.2"
- run: npm run install:all
- run: npm run lint
- run: npm run pretty

View file

@ -6,6 +6,7 @@ config({ path: path.join(__dirname, ".env") });
const cors = require("cors");
const admin = require("firebase-admin");
const Logger = require("./handlers/logger.js");
// eslint-disable-next-line
const serviceAccount = require("./credentials/serviceAccountKey.json");
const db = require("./init/db");
const jobs = require("./jobs");

View file

@ -4,6 +4,7 @@ config({ path: path.join(__dirname, ".env") });
const db = require("./init/db");
const admin = require("firebase-admin");
// eslint-disable-next-line
const serviceAccount = require("./credentials/serviceAccountKey.json");
async function main() {

2
bin/install.sh Executable file
View file

@ -0,0 +1,2 @@
npm install & (cd ./frontend && npm install) & (cd ./backend && npm install)
wait

View file

@ -8,7 +8,7 @@
"start:dev:be": "cd backend && npm run start:dev",
"start:dev:fe": "cd frontend && npm run start:dev",
"deploy:live": "cd frontend && npm run deploy:live",
"install:all": "npm install && `cd ./frontend && npm install` && `cd ./backend && npm install`",
"install:all": "sh ./bin/install.sh",
"lint": "./node_modules/.bin/eslint './backend/**/*.js' './frontend/src/js/**/*.js'",
"pretty": "prettier --check './backend/**/*.js' './frontend/src/**/*.{js,scss}' './frontend/static/**/*.{json,html}'"
},