Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
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
21 changes: 21 additions & 0 deletions .github/workflows/check_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build EE2 Docker Image

on:
pull_request

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: false
tags: ee2/test:test
40 changes: 25 additions & 15 deletions .github/workflows/ee2-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# This workflow will install Python dependencies, run tests and lint
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

# To ssh into this build add the following:
#- name: Start SSH session
# uses: luchihoratiu/debug-via-ssh@main
# with:
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
# SSH_PASS: ${{ secrets.SSH_PASS }}

name: Execution Engine 2 Test Suite

Expand All @@ -18,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
name: Lint With Black
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --verbose"
Expand All @@ -35,11 +29,11 @@ jobs:
name: Lint With Flake8
steps:
- name: Check out source repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.10.14"
- name: flake8 Lint Lib
uses: py-actions/flake8@v2
with:
Expand All @@ -50,22 +44,38 @@ jobs:
path: "./test"



Build_and_Run_Tests_and_CodeCov:
name: Build and Run Tests and CodeCov
runs-on: ubuntu-latest
strategy:
matrix:
mongo-config:
- version: "7.0"
init-path: "./test/dockerfiles/mongo/docker-entrypoint-initdb.d-7.0/"
- version: "3.6"
init-path: "./test/dockerfiles/mongo/docker-entrypoint-initdb.d-3.6/"
steps:
- name: Check out source repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.10.14"
- name: Install dependencies
run: |
pip install -r requirements.txt
git clone https://github.com/kbase/jars /opt/jars
- name: Build Docker Image
- name: Set MongoDB Version and Init Path
run: |
docker build . -t execution_engine2:test
- name: Run Tests
echo "MONGO_VERSION=${{ matrix.mongo-config.version }}" >> $GITHUB_ENV
echo "INIT_PATH=${{ matrix.mongo-config.init-path }}" >> $GITHUB_ENV
- name: Start Services and Run Tests
run: |
docker-compose up -d
docker compose up -d
cp test/env/test.travis.env test.env
make test-coverage
codecov
codecov --token="${{ secrets.CODECOV_TOKEN }}"
- name: Cleanup
run: |
docker compose down
17 changes: 1 addition & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,8 @@ RUN curl -o /tmp/dockerize.tgz https://raw.githubusercontent.com/kbase/dockerize
rm /tmp/dockerize.tgz


# install mongodb
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" | tee /etc/apt/sources.list.d/mongodb-org-3.6.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends mongodb-org=3.6.11 mongodb-org-server=3.6.11 mongodb-org-shell=3.6.11 mongodb-org-mongos=3.6.11 mongodb-org-tools=3.6.11 \
&& apt-get install -y --no-install-recommends mongodb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN echo "mongodb-org hold" | dpkg --set-selections \
&& echo "mongodb-org-server hold" | dpkg --set-selections \
&& echo "mongodb-org-shell hold" | dpkg --set-selections \
&& echo "mongodb-org-mongos hold" | dpkg --set-selections \
&& echo "mongodb-org-tools hold" | dpkg --set-selections

#Install Python3 and Libraries (source /root/miniconda/bin/activate)
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh \
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py310_24.5.0-0-Linux-x86_64.sh -O ~/miniconda.sh \
&& bash ~/miniconda.sh -b -p /miniconda-latest

# Setup Cron
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ setup-database:
test-coverage:
# Set up travis user in mongo
@echo "Run tests for $(TESTS)"
PYTHONPATH=.:lib:test pytest --cov-report=xml --cov lib/execution_engine2/ --verbose $(TESTS)
PYTHONPATH=.:lib:test pytest --cov-report=xml --cov-report=term --cov lib/execution_engine2/ --verbose $(TESTS)

build-condor-test-image:
cd test/dockerfiles/condor && echo `pwd` && docker build -f Dockerfile . -t $(CONDOR_DOCKER_IMAGE_TAG_NAME)
Expand Down
Loading