This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
generated from twilio-professional-services/flex-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f13bdf3
Showing
1,223 changed files
with
51,324 additions
and
0 deletions.
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,27 @@ | ||
name: Deploy Flex on Merge | ||
|
||
# This is an example workflow for automatically triggered deployments | ||
# Copy this file to the workflows directory to use it | ||
|
||
on: | ||
push: | ||
branches: | ||
# Change the branches below to match your desired configuration | ||
# These should be protected branches | ||
- develop | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
uses: ./.github/workflows/flex_deploy.yaml | ||
with: | ||
# Change inputs below to match your desired configuration | ||
# Uses the 'production' env when pushing to the main branch, or 'dev' env when pushing to the develop branch | ||
environment: ${{ github.ref_name == 'main' && 'production' || 'dev' }} | ||
deploy_terraform: true | ||
overwrite_config: false | ||
secrets: | ||
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }} | ||
TWILIO_API_KEY: ${{ secrets.TWILIO_API_KEY }} | ||
TWILIO_API_SECRET: ${{ secrets.TWILIO_API_SECRET }} | ||
TF_ENCRYPTION_KEY: ${{ secrets.TF_ENCRYPTION_KEY }} |
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,9 @@ | ||
### Summary | ||
|
||
_Provide a summary of the change_ | ||
|
||
### Checklist | ||
|
||
- [ ] Tested changes end to end | ||
- [ ] Updated documentation | ||
- [ ] Requested one or more reviewers |
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,95 @@ | ||
name: Checks | ||
|
||
# Within this file, FEATURE and END FEATURE blocks are used only by the remove-features script. | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
branches: | ||
- main | ||
paths: | ||
- 'plugin-flex-ts-template-v2/**' | ||
- 'serverless-functions/**' | ||
# FEATURE: schedule-manager | ||
- 'serverless-schedule-manager/**' | ||
# END FEATURE: schedule-manager | ||
# Enable running this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: setup node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install packages | ||
run: | | ||
npm install --no-save eslint | ||
cd plugin-flex-ts-template-v2 | ||
npm install | ||
cd ../serverless-functions | ||
npm install | ||
# FEATURE: schedule-manager | ||
- name: Install schedule manager packages | ||
working-directory: serverless-schedule-manager | ||
run: npm install | ||
# END FEATURE: schedule-manager | ||
- name: Run eslint | ||
run: npm run lint:report | ||
continue-on-error: true | ||
- name: Annotate Code Linting Results | ||
id: annotate | ||
uses: ataylorme/eslint-annotate-action@v2 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
report-json: "eslint_report.json" | ||
- name: Comment on error | ||
uses: mshick/add-pr-comment@v2 | ||
if: always() && steps.annotate.outputs.errorCount > 0 | ||
with: | ||
message: | | ||
${{steps.annotate.outputs.summary}} | ||
:rotating_light: Errors must be resolved before merging, and have been annotated in the "Files changed" tab. Run `npm run lint` if you would like to see results locally. | ||
- name: Comment on warning | ||
uses: mshick/add-pr-comment@v2 | ||
if: always() && steps.annotate.outputs.errorCount < 1 && steps.annotate.outputs.warningCount > 0 | ||
with: | ||
message: | | ||
${{steps.annotate.outputs.summary}} | ||
:warning: Merging is still possible with these warnings, but please fix them if possible! Annotations are available in the "Files changed" tab. Run `npm run lint` if you would like to see results locally. | ||
- name: Comment on no issues | ||
uses: mshick/add-pr-comment@v2 | ||
if: always() && steps.annotate.outputs.errorCount < 1 && steps.annotate.outputs.warningCount < 1 | ||
with: | ||
message: | | ||
${{steps.annotate.outputs.summary}} | ||
:white_check_mark: No issues found! | ||
test-plugin-v2: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: setup node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install packages | ||
working-directory: ./plugin-flex-ts-template-v2 | ||
run: npm install | ||
- name: Run tests | ||
working-directory: ./plugin-flex-ts-template-v2 | ||
run: npm run test:ci | ||
- name: Publish test results | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() | ||
with: | ||
report_paths: './plugin-flex-ts-template-v2/test-results/junit.xml' |
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,59 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy docs site to GH pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "docs/**" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
env: | ||
# Hosted GitHub runners have 7 GB of memory available, let's use 6 GB | ||
NODE_OPTIONS: --max-old-space-size=6144 | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
if: ${{ vars.DEPLOY_DOCS == 'true' }} | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Build | ||
working-directory: docs | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v1 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload entire repository | ||
path: docs/build | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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,31 @@ | ||
name: Docs checks | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
branches: | ||
- main | ||
paths: | ||
- 'docs/**' | ||
# Enable running this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
if: ${{ vars.DEPLOY_DOCS == 'true' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: setup node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install packages | ||
working-directory: ./docs | ||
run: npm install | ||
- name: Run build | ||
working-directory: ./docs | ||
run: npm run build |
Oops, something went wrong.