-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8ba370a
working on github actions
danbilokha 5776d6d
add jest rule
danbilokha 11fdaad
docker & release improvement
danbilokha 8bca52d
basic tests
danbilokha 80645a4
add simple message for container info
danbilokha 34c6e1c
Update integrate.yml
danbilokha c70c694
Delete .coveralls.yml
danbilokha dc31b14
1 release file, instead of two; add coverall github action
danbilokha 63edb5d
fix reports.yml
danbilokha 14fcbc2
fix reports.yml
danbilokha aa53af8
add prod.release.bat, delete unused command in package.json
danbilokha File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Node CI | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Reporsts | ||
|
||
on: ["push", "pull_request"] | ||
|
||
jobs: | ||
reports: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use NodeJs | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Remove & re-install packages | ||
run: | | ||
npm ci | ||
npm test | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel: true | ||
path-to-lcov: ./coverage/lcov.info # optional (default value) | ||
- name: Coveralls Finished | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel-finished: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
# folders | ||
node_modules/ | ||
dist/ | ||
|
||
#coverage | ||
coverage/ | ||
.coveralls.yml | ||
|
||
# ide & other stuff files | ||
.idea/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CALL cd .. | ||
CALL heroku container:login | ||
CALL heroku container:push web --app=%1 | ||
CALL heroku container:release web --app=%1 | ||
CALL heroku open --app=%1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
CALL cd .. | ||
CALL heroku container:login | ||
CALL heroku container:push web --app=covid19liveupdbot | ||
CALL heroku container:release web --app=covid19liveupdbot | ||
CALL heroku open --app=covid19liveupdbot | ||
CALL heroku container:push web --app=%1 | ||
CALL heroku container:release web --app=%1 | ||
CALL heroku open --app=%1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't wait to see this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
34% 👍 Even though we're testing only 1 file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thant's because it hasn't been mocked, I suppose