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

Revert 7 rykon3007 patch 3 #155

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a15e4e0
Create test-and-build.yml
jssrshun Jan 12, 2021
3ed6082
Update test-and-build.yml
rykon3007 Jan 12, 2021
0996634
Create node.js.yml
rykon3007 Jan 12, 2021
8c10b05
init workflow
rykon3007 Jan 12, 2021
05573fe
Create SECURITY.md
jssrshun Jan 12, 2021
5a6f449
Update SECURITY.md
jssrshun Jan 12, 2021
7c1ffbd
Merge pull request #1 from rykon3007/test-s-policy
rykon3007 Jan 12, 2021
fc07f17
Update README.md
rykon3007 Jan 12, 2021
1c368e0
Merge pull request #2 from rykon3007/rykon3007-patch-1
rykon3007 Jan 12, 2021
ddfbeeb
upd
rykon3007 Jan 12, 2021
fa83e6a
Update utils.test.js
jssrshun Jan 12, 2021
6a01395
Update utils.test.js
jssrshun Jan 12, 2021
0e85191
Update utils.test.js
jssrshun Jan 12, 2021
52044ad
Merge pull request #3 from rykon3007/jssrshun-patch-1
rykon3007 Jan 12, 2021
e6465cb
Create azure.yml
rykon3007 Jan 12, 2021
35318c9
Merge pull request #5 from rykon3007/rykon3007-patch-2
jssrshun Jan 12, 2021
4bb4991
Update azure.yml
rykon3007 Jan 12, 2021
efabbc4
Merge pull request #7 from rykon3007/rykon3007-patch-3
jssrshun Jan 12, 2021
f0c97c0
Add or update the App Service deployment workflow configuration from …
rykon3007 Jan 12, 2021
4d49fdb
Update master_github4(dev).yml
rykon3007 Jan 12, 2021
1e8425a
Add or update the App Service deployment workflow configuration from …
rykon3007 Jan 12, 2021
dced205
upd workflow
rykon3007 Jan 12, 2021
5a39284
Update index.pug
jssrshun Jan 12, 2021
2bbbf61
Merge pull request #9 from rykon3007/jssrshun-patch-4
rykon3007 Jan 12, 2021
619ec72
Update master_github4.yml
rykon3007 Jan 12, 2021
173a98d
Revert "Update s azure.yml"
rykon3007 Jan 12, 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
49 changes: 49 additions & 0 deletions .github/workflows/azure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow will build and push a node.js application to an Azure Web App when a release is created.
#
# This workflow assumes you have already created the target Azure App Service web app.
# For instructions see https://docs.microsoft.com/azure/app-service/app-service-plan-manage#create-an-app-service-plan
#
# To configure this workflow:
#
# 1. For Linux apps, add an app setting called WEBSITE_WEBDEPLOY_USE_SCM and set it to true in your app **before downloading the file**.
# For more instructions see: https://docs.microsoft.com/azure/app-service/configure-common#configure-app-settings
#
# 2. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile.
# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret
#
# 3. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below).
#
# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
on:
release:
types: [created]

env:
AZURE_WEBAPP_NAME: your-app-name # 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: '10.x' # set this to the node version to use

jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
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: '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 }}
35 changes: 35 additions & 0 deletions .github/workflows/master_github4(dev).yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Dev

on:
pull_request:
branches:
- master

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
with:
app-name: 'github4'
slot-name: 'dev'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_d5b1dbab2209482bb34e21c5c829a1bf }}
package: .
40 changes: 40 additions & 0 deletions .github/workflows/master_github4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Product

on:
pull_request:
branches:
- master
types: [closed]

jobs:
job:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true

build-and-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
with:
app-name: 'github4'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_a797a18d20784f84a16d14870e6fd662 }}
package: .
30 changes: 30 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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: [10.x, 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
- run: npm test
14 changes: 14 additions & 0 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Node build and test

on : [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- users: actions/checkout@v2
- name: npm install and build
run: |
npm install
npm run build --if-present
npm test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Welcome
## Hellow 2

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.

Expand Down
24 changes: 24 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.


add XXX comment(policy test).
8 changes: 6 additions & 2 deletions test/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ var mochaAsync = fn => {

describe("Utils", function() {
describe("greetings", function() {
it("Says Hello World", function() {
assert.equal(utils.greetings("World"), "Hello World 👋👋");
//it("Says Hello World", function () {
//assert.equal(utils.greetings("World"), "test");
//});

it("Says Hello World", function () {
assert.equal(utils.greetings("World"), "Hello World 👋👋");
});

it("Throws on missing params", function() {
Expand Down
2 changes: 1 addition & 1 deletion views/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ html
a(href="#") Docs
a(href="#") About
main.wrap
h1 Hello 🌎!
h1 Hello 🌎! I love ramen
hr
p This is our Tonkotsu 🍜 NodeJS webapp. You can find instructions inside the repository.
pre #{zen.msg}
Expand Down