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

Staging branch added #163

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
88fcd41
Create node.js.yml
Anurenjini78 Mar 29, 2021
a95347c
Update README.md
Anurenjini78 Mar 29, 2021
2052190
Update node.js.yml
Anurenjini78 Mar 29, 2021
2d36f1b
Update README.md
Anurenjini78 Mar 29, 2021
bb21b9c
Update README.md
Anurenjini78 Mar 29, 2021
42f0c67
Update README.md
Anurenjini78 Mar 29, 2021
cc69a39
Update node.js.yml
AravindaSB Mar 29, 2021
ebb4445
Update README.md
Anurenjini78 Mar 29, 2021
dea2353
Update README.md
Anurenjini78 Mar 29, 2021
81cb60f
Merge pull request #1 from Anurenjini78/Staging
Anurenjini78 Mar 29, 2021
6ce82eb
Create code-quality.yml
Anurenjini78 Mar 29, 2021
1277f5f
Update code-quality.yml
Anurenjini78 Mar 29, 2021
8df1c95
Update utils.test.js
Anurenjini78 Mar 29, 2021
9869540
Update utils.test.js
Anurenjini78 Mar 29, 2021
fca0ae2
Update utils.test.js
Anurenjini78 Mar 29, 2021
364342b
Update utils.test.js
Anurenjini78 Mar 29, 2021
60e1ac8
Create opened-issues-triage.yml
AravindaSB Mar 29, 2021
17f51b7
Create assigned-pulls-todo.yml
AravindaSB Mar 29, 2021
6dcf39c
Update opened-issues-triage.yml
AravindaSB Mar 29, 2021
8ee4860
Update assigned-pulls-todo.yml
AravindaSB Mar 29, 2021
f03dbed
Merge branch 'master' into Staging
Anurenjini78 Mar 29, 2021
d445580
Merge pull request #2 from Anurenjini78/Staging
Anurenjini78 Mar 29, 2021
ac9be85
Update opened-issues-triage.yml
Anurenjini78 Mar 29, 2021
48c40fb
Update opened-issues-triage.yml
Anurenjini78 Mar 29, 2021
a9fadd5
Update assigned-pulls-todo.yml
Anurenjini78 Mar 29, 2021
78d08d6
Merge pull request #7 from Anurenjini78/Staging
AravindaSB Mar 29, 2021
f03b766
Create azure.yml
Anurenjini78 Mar 29, 2021
9c4bd47
Merge pull request #8 from Anurenjini78/Staging
Anurenjini78 Mar 29, 2021
f687270
Create Production.yml
Anurenjini78 Mar 29, 2021
c45c8f3
Merge branch 'master' into Staging
Anurenjini78 Mar 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/Production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
pull_request:
types: [ closed ]
branches: [ master ]

env:
AZURE_WEBAPP_NAME: Prodgithub # set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: '14.x' # set this to the node version to use

jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: npm install, build, and test
run: |
# Build and test the project, then
# deploy to Azure Web App.
npm install
npm run build --if-present
npm run test --if-present
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 'Deploy to Azure WebApp'
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
15 changes: 15 additions & 0 deletions .github/workflows/assigned-pulls-todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Move assigned pull requests into To do

on:
pull_request:
types: [assigned]

jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- uses: alex-page/[email protected]
with:
project: Welcome
column: To Do
repo-token: ${{ secrets.GH_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/azure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
pull_request:
types: [ opened ]

env:
AZURE_WEBAPP_NAME: Githubazure # set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: '14.x' # set this to the node version to use

jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: npm install, build, and test
run: |
# Build and test the project, then
# deploy to Azure Web App.
npm install
npm run build --if-present
npm run test --if-present
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 'Deploy to Azure WebApp'
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
21 changes: 21 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on: [push]

jobs:
check-quality:
runs-on: ubuntu-latest
name: A job to check my code quality
steps:
- name: Check code meets quality standards
id: code-inspector
uses: codeinspectorio/github-action@master
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
code_inspector_access_key: ${{ secrets.CODE_INSPECTOR_ACCESS_KEY }}
code_inspector_secret_key: ${{ secrets.CODE_INSPECTOR_SECRET_KEY }}
min_quality_grade: 'WARNING'
min_quality_score: '50'
max_defects_rate: '0.1001'
max_complex_functions_rate: '0.0001'
max_long_functions_rate: '0.0001'
project_name: ''
max_timeout_sec: '600'
59 changes: 59 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 12.x, 14.x, 15.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@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- uses: actions/upload-artifact@main
with:
name: artifacts
path: |
lib/
test/
views/
package.json
index.js
test:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
node-version: [14.x]
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@main
with:
name: artifacts
path: artifacts
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, and test
run: |
npm install
npm test
15 changes: 15 additions & 0 deletions .github/workflows/opened-issues-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Move new issues into Triage

on:
issues:
types: [opened]

jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- uses: alex-page/[email protected]
with:
project: Welcome
column: Done
repo-token: ${{ secrets.GH_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## Welcome

This repository contains the base project part of our on-site GitHub Verified Partner workshop program. It is meant to be used for in-classroom training under the supervision of GitHub coaches.
This repository contains the base project part of our on-site GitHub Verified Partner workshop program. It is meant to be used for in-classroom training under the supervision of GitHub coachess.

This is the NodeJS version of our "Tonkotsu" workshop webapp. The codebase is pretty simple: it's a NodeJS app that will connect to GitHub's [Octocat API endpoint](https://api.github.com/octocat) and return the Zen quote of the day. E.g.:
This is the NodeJS version of our "Tonkotsu" workshopp webapp. The codebase is pretty simple: it's a NodeJS app that will connect to GitHub's [Octocat API endpoint](https://api.github.com/octocat) and return the Zen quote of the day. E.g.:

### Demo (sucess)

![out](https://user-images.githubusercontent.com/1078545/57860397-bc7ff380-77ec-11e9-80f8-39e02ef3c035.gif)


### Demo (failure)
### Demo (failure)newfile

![out](https://user-images.githubusercontent.com/1078545/57860396-bc7ff380-77ec-11e9-8f55-83b879e667d2.gif)

Expand Down