This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Showing
73 changed files
with
3,986 additions
and
3,445 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
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 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 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 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 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Create LTS Versions | |
|
||
on: | ||
schedule: | ||
- cron: '0 0 1,16 * *' | ||
- cron: "0 0 1,16 * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
@@ -22,7 +22,7 @@ jobs: | |
if [ $REL_TIME '>' $LTS_TIME ]; then curl -s -X PATCH -H "Accept: application/vnd.github+json" -H "Authorization: token $TOKEN" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/$REL_ID -d '{"name":"'"${REL_NAME}-LTS"'"}' > /dev/null; echo "new_lts_zip=$REL_ZIP" >> $GITHUB_OUTPUT; echo "release_name=$REL_NAME" >> $GITHUB_OUTPUT; else echo "no_release=true" >> $GITHUB_OUTPUT; fi # If there has been a non-LTS release since the last LTS release, create a new LTS release | ||
env: | ||
TOKEN: ${{ secrets.DX_GITHUB_TOKEN }} | ||
|
||
create_lts: | ||
name: Create A New LTS Release | ||
runs-on: ubuntu-latest | ||
|
@@ -54,8 +54,8 @@ jobs: | |
uses: Bandwidth/[email protected] | ||
with: | ||
bucket-name: ${{ steps.bucket_name.outputs.bucket_name }} | ||
bucket-expiration: '180' | ||
bucket-region: 'us-east-1' | ||
bucket-expiration: "180" | ||
bucket-region: "us-east-1" | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
content-path: ./lts/build | ||
|
@@ -68,7 +68,7 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configure Git and Create Branch | ||
run: | | ||
git config user.email "[email protected]" | ||
|
@@ -86,6 +86,6 @@ jobs: | |
git add site/lts.config.json | ||
git commit -m 'update lts table' | ||
git push origin auto-update-lts | ||
gh pr create -B main -H auto-update-lts --title 'Update LTS Versions Table' --body 'Auto-generated by Create LTS Versions Workflow' | ||
gh pr create -B main -H auto-update-lts --title 'SWI-3486 Update LTS Versions Table' --body 'Auto-generated by Create LTS Versions Workflow' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.DX_GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.DX_GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -11,76 +11,8 @@ on: | |
- "site/**" | ||
|
||
jobs: | ||
cypress_cloudfront: | ||
name: Cypress Against Cloudfront Staged Site | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged == true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
browser: [chrome] | ||
steps: | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
|
||
- name: Set Environment Variables | ||
run: | | ||
BRANCH_NAME=${GITHUB_HEAD_REF#refs/heads/} | ||
BRANCH_NAME=$(echo "$BRANCH_NAME" | tr '[:upper:]' '[:lower:]') | ||
BRANCH_NAME=$(echo "$BRANCH_NAME" | sed -e "s/[^a-z0-9]/-/g") | ||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
- name: Create Cypress Config | ||
run: | | ||
cd ./site | ||
cat >staged-cypress.config.js <<EOL | ||
const { defineConfig } = require("cypress"); | ||
module.exports = defineConfig({ | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
baseUrl: "https://${{env.BRANCH_NAME}}.staging-dev.bandwidth.com/" | ||
}, | ||
projectId: "oz7rpf", | ||
pageLoadTimeout: 60000, | ||
viewportWidth: 1440, | ||
viewportHeight: 900, | ||
video: false, | ||
videoUploadOnPasses: false, | ||
screenshotOnRunFailure: true, | ||
retries: 3, | ||
}); | ||
EOL | ||
- name: Cypress Staged Cloudfront Deployment Test | ||
uses: cypress-io/[email protected] | ||
timeout-minutes: 40 | ||
with: | ||
browser: ${{ matrix.browser }} | ||
working-directory: ./site | ||
config-file: staged-cypress.config.js | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
delete_bucket_folder: | ||
name: Delete Bucket Folder | ||
if: ${{ success() || github.event.pull_request.merged == false }} | ||
needs: [cypress_cloudfront] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set Environment Variables | ||
|
@@ -102,7 +34,7 @@ jobs: | |
|
||
notify_for_failures: | ||
name: Notify for Failures | ||
needs: [cypress_cloudfront, delete_bucket_folder] | ||
needs: [delete_bucket_folder] | ||
if: failure() | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
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 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 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
Oops, something went wrong.