Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: Launch e2e tests
on: [push]
name: e2e tests
on:
workflow_run:
workflows: ["Build and push docker images"]
types: [completed]
# note that it is run only on main! which is somewhat useless :'(
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
workflow_dispatch:
# ^ run manually if you need to have the e2e tests

env:
# required to get access to use a cached poetry venv in "/home/runner/.cache/pypoetry/virtualenvs"
Expand All @@ -15,8 +22,21 @@ jobs:
os: [ubuntu-latest]
working-directory: [e2e]
runs-on: ${{ matrix.os }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- 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: ${{ env.REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Install poetry
run: pipx install poetry==${{ matrix.poetry-version }}
- name: Use Python
Expand All @@ -26,9 +46,9 @@ jobs:
cache: 'poetry'
cache-dependency-path: |
${{ matrix.working-directory }}/poetry.lock
- name: Build the docker images
run: docker-compose build
- name: Launch the services
env:
DOCKER_TAG: sha-${{ steps.vars.outputs.sha_short }}
run: docker-compose up -d
- name: Install dependencies
run: |
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
build:
context: .
dockerfile: ./services/api/Dockerfile
image: 707930574880.dkr.ecr.us-east-1.amazonaws.com/hub-datasets-server-api:${DOCKER_TAG}
volumes:
- assets:/assets:ro
environment:
Expand All @@ -42,6 +43,7 @@ services:
build:
context: .
dockerfile: ./services/worker/Dockerfile
image: 707930574880.dkr.ecr.us-east-1.amazonaws.com/hub-datasets-server-worker:${DOCKER_TAG}
volumes:
- assets:/assets:rw
environment:
Expand All @@ -56,6 +58,7 @@ services:
build:
context: .
dockerfile: ./services/worker/Dockerfile
image: 707930574880.dkr.ecr.us-east-1.amazonaws.com/hub-datasets-server-worker:${DOCKER_TAG}
volumes:
- assets:/assets:rw
environment:
Expand All @@ -70,6 +73,7 @@ services:
build:
context: .
dockerfile: ./services/admin/Dockerfile
image: 707930574880.dkr.ecr.us-east-1.amazonaws.com/hub-datasets-server-admin:${DOCKER_TAG}
environment:
MONGO_URL: "mongodb://mongodb"
depends_on:
Expand Down