Skip to content

Commit e6f721e

Browse files
jamesxu123logan-rTony9984
authored
fix: move ci/cd to github actions (#700)
* release: version 3.1.2 (#689) * feat: Hacker location fields (#687) * feat: add additional optional fields for hacker location * feat: update documentation to include hacker location * feat: update emails and bump version Co-authored-by: Tony <36376980+Tony9984@users.noreply.github.com> * merge and resolve conflicts * Create node.js.yml * Update node.js.yml * Update node.js.yml * Update app.js * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update node.js.yml * Update package.json * Update account.test.js * Update account.test.js * add elastic apm to see where tests are going wrong * move apm to app.js so it gets picked up by test * add apm env to gh workflow * add missing envs * remove debugging tools * remove elastic apm * run ci/cd on master as well * Update .nvmrc * Update package.json * Delete .travis.yml * Update package.json Co-authored-by: Logan Ralston <logan.ralston@mail.mcgill.ca> Co-authored-by: Tony <36376980+Tony9984@users.noreply.github.com>
1 parent ac17ddb commit e6f721e

File tree

8 files changed

+77
-26
lines changed

8 files changed

+77
-26
lines changed

.github/workflows/node.js.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ dev, master ]
9+
pull_request:
10+
branches: [ dev, master ]
11+
12+
jobs:
13+
build:
14+
services:
15+
mongodb:
16+
image: mongo
17+
ports:
18+
- 27017:27017
19+
environment: testing
20+
runs-on: ubuntu-latest
21+
22+
strategy:
23+
matrix:
24+
node-version: [14.x]
25+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Use Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v2
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
- run: npm ci
34+
- run: npm test
35+
env:
36+
AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.AUTH_PROVIDER_X509_CERT_URL }}
37+
AUTH_URI: ${{ secrets.AUTH_URI }}
38+
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
39+
CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }}
40+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
41+
CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }}
42+
DB_ADDRESS_TEST: localhost:27017/hackerapi
43+
# DB_ADDRESS_TEST: ${{ secrets.DB_ADDRESS_TEST }}
44+
# DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }}
45+
# DB_USER_TEST: ${{ secrets.DB_USER_TEST }}
46+
JWT_CONFIRM_ACC_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }}
47+
JWT_INVITE_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }}
48+
JWT_RESET_PWD_SECRET: ${{ secrets.JWT_RESET_PWD_SECRET }}
49+
NO_REPLY_EMAIL: ${{ secrets.NO_REPLY_EMAIL }}
50+
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
51+
PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }}
52+
PROJECT_ID: ${{ secrets.PROJECT_ID }}
53+
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
54+
TOKEN_URI: ${{ secrets.TOKEN_URI }}
55+
TYPE: ${{ secrets.TYPE }}
56+
PORT: 3000
57+
ADDRESS: localhost
58+
COOKIE_SECRET: ${{ secrets.COOKIE_SECRET }}
59+
# we don't currently have hosted elastic apm
60+
# ELASTIC_APM_SERVICE_NAME: ${{ secrets.ELASTIC_APM_SERVICE_NAME }}
61+
# ELASTIC_APM_SECRET_TOKEN: ${{ secrets.ELASTIC_APM_SECRET_TOKEN }}
62+
# ELASTIC_APM_SERVER_URL: ${{ secrets.ELASTIC_APM_SERVER_URL }}
63+
FRONTEND_ADDRESS_DEV: localhost:1337
64+
FRONTEND_ADDRESS_DEPLOY: app.mchacks.ca

.idea/vcs.xml

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.17.0
1+
v14

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Services = {
1313

1414
const envLoadResult = Services.env.load(path.join(__dirname, "./.env"));
1515
if (envLoadResult.error) {
16-
Services.log.error(envLoadResult.error);
16+
Services.log.warn(envLoadResult.error);
1717
}
1818

1919
const passport = require("passport");

bin/www.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/**
33
* Module dependencies.
44
*/
5-
65
const app = require("../app").app;
76
const debug = require("debug")("hackboard:server");
87
const http = require("http");

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"lint": "eslint --fix '**/*.js'"
1515
},
1616
"engines": {
17-
"node": "10.17.0"
17+
"node": "14.x"
1818
},
1919
"dependencies": {
2020
"@google-cloud/storage": "^5.5.0",

0 commit comments

Comments
 (0)