-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #999 from bcgov/dev
Release 1.2.18
- Loading branch information
Showing
108 changed files
with
5,133 additions
and
4,097 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Build and Deploy Cypress and Execute Tests | ||
name: Cypress and Execute Tests | ||
|
||
on: | ||
workflow_dispatch: {} | ||
push: | ||
branches: ['test', 'cypress*'] | ||
|
||
|
@@ -27,36 +28,35 @@ jobs: | |
- name: Checkout Portal | ||
uses: actions/checkout@v2 | ||
|
||
# - name: Determine Download file name | ||
# id: set_variable | ||
# run: | | ||
# echo ${{ runner.arch }} | ||
# if [ "${{ runner.arch }}" == "X64" ]; then | ||
# echo "::set-output name=my_variable::gwa_Linux_x86_64.tgz" | ||
# elif [ "${{ runner.arch }}" == "ARM64" ]; then | ||
# echo "::set-output name=my_variable::gwa_Linux_arm64.tgz" | ||
# else | ||
# echo "unsupported architecture" | ||
# fi | ||
|
||
- name: Determine Download file name | ||
id: set_variable | ||
run: | | ||
echo ${{ runner.arch }} | ||
if [ "${{ runner.arch }}" == "X64" ]; then | ||
echo "::set-output name=my_variable::gwa_Linux_x86_64.tgz" | ||
elif [ "${{ runner.arch }}" == "ARM64" ]; then | ||
echo "::set-output name=my_variable::gwa_Linux_arm64.tgz" | ||
else | ||
echo "unsupported architecture" | ||
fi | ||
- name: Download Binar | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: "bcgov/gwa-cli" | ||
latest: true | ||
fileName: ${{ steps.set_variable.outputs.my_variable }} | ||
out-file-path: "${{ github.workspace }}/e2e" | ||
# - name: Download Binary | ||
# uses: robinraju/[email protected] | ||
# with: | ||
# repository: "bcgov/gwa-cli" | ||
# latest: true | ||
# fileName: ${{ steps.set_variable.outputs.my_variable }} | ||
# out-file-path: "${{ github.workspace }}/e2e" | ||
|
||
# - name: Unzip file | ||
# run: | | ||
# cd ${{ github.workspace }}/e2e | ||
# tar xvzf ${{ steps.set_variable.outputs.my_variable }} | ||
|
||
- name: Unzip file | ||
run: | | ||
cd ${{ github.workspace }}/e2e | ||
tar xvzf ${{ steps.set_variable.outputs.my_variable }} | ||
- name: Build Docker Images | ||
run: | | ||
docker-compose build | ||
docker compose --profile testsuite build | ||
- name: Spin up API Services Portal and Run E2E Tests | ||
run: | | ||
export CY_EXECUTION_ENV=${{ env.EXECUTION_ENV }} | ||
|
@@ -68,14 +68,14 @@ jobs: | |
export CY_COMMIT_MESSAGE="${{ env.GIT_COMMIT_MESSAGE }}" | ||
export CY_REPO_URL=${{ env.GIT_REPO_URL }} | ||
export CY_COMMIT_AUTHOR_EMAIL=$(git --no-pager show -s --format='%ae' ${{ env.GIT_COMMIT_SHA }}) | ||
docker-compose up -d | ||
docker compose --profile testsuite up -d | ||
- name: Execute Tests & Clean Up | ||
run: | | ||
while true; do | ||
if [ "$(docker ps -aq -f status=exited -f name=cypress-e2e)" ]; then | ||
# cleanup | ||
docker-compose down | ||
docker compose down | ||
break | ||
else | ||
echo "Waiting for Cypress to Complete E2E Tests....." | ||
|
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Add URL to Feature PRs | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set KEBAB_CASE_BRANCH | ||
run: | | ||
# Convert github.head_ref to kebab case | ||
kebab_case=$(echo "${{ github.head_ref }}" | sed 's/_/-/g; s/\//-/g') | ||
echo "::set-output name=KEBAB_CASE_BRANCH::${kebab_case}" | ||
id: set-branch-id | ||
|
||
- name: Check the KEBAB_CASE_BRANCH output | ||
run: echo "The KEBAB_CASE_BRANCH is ${{ steps.set-branch-id.outputs.KEBAB_CASE_BRANCH }}" | ||
|
||
- name: PR Description | ||
if: startsWith(github.head_ref, 'feature/') == true | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
add_markdown: | | ||
--- | ||
🚀 Feature branch deployment: https://api-services-portal-${{ steps.set-branch-id.outputs.KEBAB_CASE_BRANCH }}.apps.silver.devops.gov.bc.ca |
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.