-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into SS-582-user-guide-images
- Loading branch information
Showing
4 changed files
with
28 additions
and
17 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 |
---|---|---|
|
@@ -32,6 +32,9 @@ jobs: | |
working-directory: . | ||
|
||
steps: | ||
- name: Workflow Telemetry | ||
uses: runforesight/[email protected] | ||
|
||
- name: Branch or tag that triggered the workflow run | ||
run: | | ||
echo "Running on branch ${GITHUB_REF##*/}" | ||
|
@@ -44,20 +47,21 @@ jobs: | |
- name: Prepare repository | ||
run: | | ||
echo "Running as UID: $UID, GID: $GID" | ||
export GID=1000 | ||
export GID=127 | ||
echo "Now running as UID: $UID, GID: $GID" | ||
whoami | ||
pwd | ||
mv .env.template .env | ||
sudo chgrp -R 1000 media | ||
sudo chgrp -R 127 media | ||
sudo chmod -R g+rwx media | ||
ls -al | ||
echo -e "UID=1001\nGID=127" > .env | ||
- name: A job to install MicroK8s | ||
uses: balchua/[email protected] | ||
with: | ||
channel: '1.26/stable' | ||
addons: '["dns", "rbac", "hostpath-storage", "registry"]' | ||
channel: '1.28/stable' | ||
addons: '["dns", "rbac", "hostpath-storage", "ingress", "helm"]' | ||
|
||
- name: Test and config MicroK8s | ||
run: | | ||
|
@@ -67,12 +71,14 @@ jobs: | |
sudo usermod -a -G microk8s $USER | ||
sudo chown -f -R $USER ~/.kube | ||
sudo microk8s config >> ~/.kube/config | ||
helm | ||
- name: Dump config | ||
working-directory: ${{env.working-directory}} | ||
run: | | ||
sudo microk8s config > cluster.conf | ||
ls -la | ||
cat cluster.conf | ||
- name: Start serve | ||
working-directory: ${{env.working-directory}} | ||
|
@@ -89,10 +95,6 @@ jobs: | |
STUDIO_URL=`awk -F '= ' -v replace="'" '/STUDIO_URL/{gsub(replace, "", $NF); print $NF}' studio/settings.py` | ||
echo "STUDIO_URL=$STUDIO_URL" >> $GITHUB_ENV | ||
echo "The Serve URL is $STUDIO_URL" | ||
docker exec studio pwd | ||
docker exec studio ls -al | ||
docker exec studio whoami | ||
docker exec studio id stackn | ||
- name: Check URL is up | ||
uses: gerdemann/[email protected] | ||
|
@@ -111,16 +113,17 @@ jobs: | |
response=$(curl --write-out '%{http_code}' --silent --output /dev/null ${{ env.STUDIO_URL }}) | ||
if [[ "$response" -ne 200 ]] ; then echo "status $response" && sleep 30; else echo "serve is ready"; fi | ||
- name: Check if celery worker can access kubectl | ||
- name: Check if celery worker can access kubectl and helm | ||
run: | | ||
docker exec celery-worker kubectl get po | ||
docker exec celery-worker kubectl version | ||
docker exec celery-worker helm version | ||
- name: Cypress run e2e tests | ||
uses: cypress-io/github-action@v5 | ||
with: | ||
working-directory: ${{env.working-directory}} | ||
config: pageLoadTimeout=100000,baseUrl=${{ env.STUDIO_URL }} | ||
browser: chrome | ||
quiet: true | ||
- name: Save cypress screenshot artifacts on failure | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -134,3 +137,11 @@ jobs: | |
with: | ||
name: cypress-videos | ||
path: cypress/videos | ||
|
||
- name: Setup upterm session | ||
uses: lhotari/action-upterm@v1 | ||
with: | ||
## If no one connects after 2 minutes, shut down server. | ||
wait-timeout-minutes: 2 | ||
|
||
|
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 |
---|---|---|
|
@@ -127,4 +127,4 @@ | |
"model": "projects.projecttemplate", | ||
"pk": 2 | ||
} | ||
] | ||
] |