Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/GitHub actions #82

Merged
merged 11 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repo_token: PwVl30TQtZV5gqGCaiDYqCqjG11tl89hP
18 changes: 18 additions & 0 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Node Continuous Integration

on:
pull_request:
branches: [ master, develop ]


jobs:
test_pull_request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test
- run: npm run build
32 changes: 5 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,13 @@
FROM node:10 as web

WORKDIR /usr/src/app
ENV ENVIRONMENT_NAME 'production'
ENV CONTAINER_VERSION '2.0.1'

COPY package*.json ./
RUN npm install --production

COPY . .
CMD node dist/server.js

###

#FROM node:10 as demo
## Create app directory
#WORKDIR /usr/src/app
#ENV ENVIRONMENT_NAME 'production'
#ENV CONTAINER_VERSION '1.5.0'
#
## Install app dependencies
## A wildcard is used to ensure both package.json AND package-lock.json are copied
## where available (npm@5+)
#COPY package*.json ./
#RUN npm install --production
## If you are building your code for production
## RUN npm ci --only=production
##COPY . .
## Bundle app source
##RUN npm run build
#
#COPY . .
#
#CMD node dist/server.js
#ARG version
#RUN ${version}=${( npm version | grep covid19liveupdates | sed "s/'(.*?)'//g")}
#ENV CONTAINER_VERSION=${version}

COPY dist/server.js .
CMD node server.js
4 changes: 2 additions & 2 deletions infrastructure/demo-release.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CALL cd ..
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move this set of comamnds to single bat.
And then jst have kind demo.bat which says relase.bat demo-covid19livebot
inside release bat it would be

CALL heroku container:push web --app=%1
CALL heroku container:release web --app=%1
CALL heroku open --app=%1

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

letme try

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually meant nor toremove this file,
But make it
release.bat demo-covid19livebot
and create a seperate one for prod
same way to be prod.release.bat

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

CALL heroku container:login
CALL heroku container:push demo --app=demo-covid19livebot
CALL heroku container:release demo --app=demo-covid19livebot
CALL heroku container:push web --app=demo-covid19livebot
CALL heroku container:release web --app=demo-covid19livebot
CALL heroku open --app=demo-covid19livebot