diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 00000000..941f103b --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,64 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ dev, master ] + pull_request: + branches: [ dev, master ] + +jobs: + build: + services: + mongodb: + image: mongo + ports: + - 27017:27017 + environment: testing + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test + env: + AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.AUTH_PROVIDER_X509_CERT_URL }} + AUTH_URI: ${{ secrets.AUTH_URI }} + BUCKET_NAME: ${{ secrets.BUCKET_NAME }} + CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} + CLIENT_ID: ${{ secrets.CLIENT_ID }} + CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} + DB_ADDRESS_TEST: localhost:27017/hackerapi +# DB_ADDRESS_TEST: ${{ secrets.DB_ADDRESS_TEST }} +# DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} +# DB_USER_TEST: ${{ secrets.DB_USER_TEST }} + JWT_CONFIRM_ACC_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} + JWT_INVITE_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} + JWT_RESET_PWD_SECRET: ${{ secrets.JWT_RESET_PWD_SECRET }} + NO_REPLY_EMAIL: ${{ secrets.NO_REPLY_EMAIL }} + PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }} + PROJECT_ID: ${{ secrets.PROJECT_ID }} + SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} + TOKEN_URI: ${{ secrets.TOKEN_URI }} + TYPE: ${{ secrets.TYPE }} + PORT: 3000 + ADDRESS: localhost + COOKIE_SECRET: ${{ secrets.COOKIE_SECRET }} + # we don't currently have hosted elastic apm +# ELASTIC_APM_SERVICE_NAME: ${{ secrets.ELASTIC_APM_SERVICE_NAME }} +# ELASTIC_APM_SECRET_TOKEN: ${{ secrets.ELASTIC_APM_SECRET_TOKEN }} +# ELASTIC_APM_SERVER_URL: ${{ secrets.ELASTIC_APM_SERVER_URL }} + FRONTEND_ADDRESS_DEV: localhost:1337 + FRONTEND_ADDRESS_DEPLOY: app.mchacks.ca diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7f..ff4fb78e 100755 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,14 @@ + + + - \ No newline at end of file + diff --git a/.nvmrc b/.nvmrc index 73bffb03..958b5a36 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -10.17.0 +v14 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5d589612..00000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: node_js -dist: trusty -sudo: false -services: - - mongodb -before_install: - - npm i -g npm@6.4.0 -before_script: - - sleep 15 -cache: - directories: - - "node_modules" - -branches: - only: - - master - - dev - -notifications: - slack: hackboard8:35nI0TJmTGbi6uQ3OfBSSoh5 diff --git a/app.js b/app.js index 2c6359a5..05434539 100755 --- a/app.js +++ b/app.js @@ -13,7 +13,7 @@ const Services = { const envLoadResult = Services.env.load(path.join(__dirname, "./.env")); if (envLoadResult.error) { - Services.log.error(envLoadResult.error); + Services.log.warn(envLoadResult.error); } const passport = require("passport"); diff --git a/bin/www.js b/bin/www.js index 6d0316e3..b76aea16 100755 --- a/bin/www.js +++ b/bin/www.js @@ -2,7 +2,6 @@ /** * Module dependencies. */ - const app = require("../app").app; const debug = require("debug")("hackboard:server"); const http = require("http"); diff --git a/package-lock.json b/package-lock.json index 50eaecaa..5563d589 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hackerAPI", - "version": "3.1.1", + "version": "3.1.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 817498e0..35e6db5e 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "lint": "eslint --fix '**/*.js'" }, "engines": { - "node": "10.17.0" + "node": "14.x" }, "dependencies": { "@google-cloud/storage": "^5.5.0",