Skip to content

Add automated functional checks #45

Add automated functional checks

Add automated functional checks #45

Workflow file for this run

name: Docker Image CI
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- env:
IMAGE_EDITION: community
- env:
IMAGE_EDITION: developer
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build --build-arg="IMAGE_EDITION=${{ matrix.env.IMAGE_EDITION }}" -t ci .
- name: Run the Docker image with tests volume mounted
run: docker run -v $(pwd)/tests:/tests -d --name ci ci
- name: Verify the Docker image
# profile for language 'web' is the last; assume everything is working if we got this far
run: docker logs -f ci |& sed "/Current profile for language 'web' is 'Sonar way'/ q"
timeout-minutes: 3
- name: Update apt lists in image
run: docker exec -u 0:0 ci apt-get update
- name: Install python in image
run: docker exec -u 0:0 ci apt-get install -y python3
- name: Install python in image
run: docker exec -u 0:0 ci pip3 install -Ur /tests/requirements.txt
- name: Run tests in image
run: docker exec -u 0:0 ci python3 /tests/test.py
- name: Stop the Docker image
run: docker stop ci