Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
siibra-explorer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiao Gui
siibra-explorer
Commits
b42b9d0f
Commit
b42b9d0f
authored
5 years ago
by
Xiao Gui
Browse files
Options
Downloads
Patches
Plain Diff
move e2e test to self-hosted
parent
1ffe8a8d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/e2e.yml
+8
-23
8 additions, 23 deletions
.github/workflows/e2e.yml
with
8 additions
and
23 deletions
.github/workflows/e2e.yml
+
8
−
23
View file @
b42b9d0f
...
...
@@ -9,13 +9,14 @@ on: [push]
env
:
DOCKER_IMAGE_NAME
:
interactive-viewer
DOCKER_IMAGE_TAG
:
${{ env.GITHUB_SHA }}
DOCKER_SAVE_FILENAME
:
iav.tar.gz
ARTEFACT_NAME
:
iav_docker_image
DOCKER_CONTAINER_NAME
:
github-actions-iav-dkr-container
jobs
:
buildimage
:
runs-on
:
ubuntu-latest
runs-on
:
self-hosted
steps
:
-
uses
:
actions/checkout@v1
...
...
@@ -23,33 +24,16 @@ jobs:
uses
:
actions/setup-node@v1
with
:
node-version
:
${{ matrix.node-version }}
-
name
:
build docker
container
-
name
:
build docker
image ${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_IMAGE_TAG }}
run
:
|
docker build --build-arg BACKEND_URL=${BACKEND_URL} -t ${DOCKER_IMAGE_NAME} .
docker build --build-arg BACKEND_URL=${BACKEND_URL} -t ${DOCKER_IMAGE_NAME}
:${DOCKER_IMAGE_TAG}
.
env
:
BACKEND_URL
:
http://localhost:3001
-
name
:
export docker image as an artefact
run
:
|
docker save ${DOCKER_IMAGE_NAME} -o ${DOCKER_SAVE_FILENAME}
-
name
:
Upload docker image
uses
:
actions/upload-artifact@v1
with
:
name
:
${{ env.ARTEFACT_NAME }}
path
:
${{ env.DOCKER_SAVE_FILENAME }}
test
:
runs-on
:
self-hosted
needs
:
buildimage
steps
:
-
name
:
Download docker image artefact
uses
:
actions/download-artifact@v1
with
:
name
:
${{ env.ARTEFACT_NAME }}
-
name
:
Load artefact as docker image
run
:
|
docker load -i ${ARTEFACT_NAME}/${DOCKER_SAVE_FILENAME}
# delete artefact, track issue: https://github.community/t5/GitHub-Actions/Delete-artifacts/td-p/38188
# - name: Remove artefact
-
uses
:
actions/checkout@v2
with
:
fetch-depth
:
2
...
...
@@ -57,9 +41,10 @@ jobs:
-
name
:
Install dependencies
run
:
|
npm i
-
name
:
run docker
container
run
:
docker run -p 3001:3000 --rm --name ${DOCKER_CONTAINER_NAME} -dit ${DOCKER_IMAGE_NAME}
-
name
:
run docker
image ${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_IMAGE_TAG }}
run
:
docker run -p 3001:3000 --rm --name ${DOCKER_CONTAINER_NAME} -dit ${DOCKER_IMAGE_NAME}
:${DOCKER_IMAGE_TAG}
-
name
:
run pptr tests
run
:
node ./node_modules/.bin/mocha ./test/databrowser.spec.js --timeout 1800000
-
name
:
cleanup
run
:
docker stop ${DOCKER_CONTAINER_NAME}
if
:
always()
run
:
docker stop ${DOCKER_CONTAINER_NAME} && docker rmi ${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment