Skip to content

Commit

Permalink
Release 1.0 ready for Git
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisM3y committed Jul 19, 2021
0 parents commit 3df4d44
Show file tree
Hide file tree
Showing 118 changed files with 23,618 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/develop-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Develop Deploy After Merge (CD)

on:
push:
branches: [develop]

env:
NODE_VERSION: '12'
APP_KEY: 'advanced-simulator-dev'
APP_NAME: 'Advanced Simulators DEV'
APP_CONTEXT_PATH: 'advanced-simulators-dev'

jobs:
deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js (v.${{ env.NODE_VERSION }})
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Node.js dependencies
run: npm install

- name: 🧪 Test
run: npm test --if-present

- name: 🚧 Build
run: |
npx c8ycli build \
--app.key="${{ env.APP_KEY }}" \
--app.name="${{ env.APP_NAME }}" \
--app.contextPath="${{ env.APP_CONTEXT_PATH }}"
- name: 🚀 Deploy
run: |
npx c8ycli deploy \
-u ${{ secrets.DEV_TENANT_URL }} \
-T ${{ secrets.DEV_TENANT_ID }} \
-U "${{ secrets.DEV_DEPLOY_USER }}" \
-P "${{ secrets.DEV_DEPLOY_PASS }}" \
49 changes: 49 additions & 0 deletions .github/workflows/develop-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Develop Pull Request (CI)

on:
push:
branches: [develop]
pull_request:
branches: [develop]

env:
NODE_VERSION: '12'

jobs:
deploy:
name: 🚧 Lint, Test & Build
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Node.js dependencies
run: npm install

- name: 🕵️‍♂️ Lint
run: npm run-script lint --if-present

- name: 🧪 Test
run: npm test --if-present

- name: 🚧 Build
run: npm run build --if-present
59 changes: 59 additions & 0 deletions .github/workflows/main-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Main Deploy After Merge (CD)

on:
push:
branches: [main]

env:
NODE_VERSION: '12'
APP_KEY: 'advanced-simulator'
APP_NAME: 'Advanced Simulators'
APP_CONTEXT_PATH: 'advanced-simulators'

jobs:
deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js (v.${{ env.NODE_VERSION }})
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Node.js dependencies
run: npm install

- name: 🧪 Test
run: npm test --if-present

- name: 🚧 Build
run: |
npx c8ycli build \
--app.key="${{ env.APP_KEY }}" \
--app.name="${{ env.APP_NAME }}" \
--app.contextPath="${{ env.APP_CONTEXT_PATH }}"
- name: 🚀 Deploy
run: |
npx c8ycli deploy \
-u ${{ secrets.MAIN_TENANT_URL }} \
-T ${{ secrets.MAIN_TENANT_ID }} \
-U "${{ secrets.MAIN_DEPLOY_USER }}" \
-P "${{ secrets.MAIN_DEPLOY_PASS }}" \
49 changes: 49 additions & 0 deletions .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Main Pull Request (CI)

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
NODE_VERSION: '12'

jobs:
deploy:
name: 🚧 Lint, Test & Build
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Node.js dependencies
run: npm install

- name: 🕵️‍♂️ Lint
run: npm run-script lint --if-present

- name: 🧪 Test
run: npm test --if-present

- name: 🚧 Build
run: npm run build --if-present
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist/
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"semi": true,
"printWidth": 120,
"useTabs": false,
"bracketSpacing": true,
"editor.formatOnSave": true,
"[typescript]": {
"editor.formatOnSave": true
}
}
Loading

0 comments on commit 3df4d44

Please sign in to comment.