Skip to content

Commit

Permalink
chore: split github workflow steps in tests job
Browse files Browse the repository at this point in the history
  • Loading branch information
michalslomczynski authored and jdobes committed Jan 8, 2024
1 parent 081b1dc commit 8404869
Show file tree
Hide file tree
Showing 5 changed files with 545 additions and 492 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,27 @@ jobs:
- name: Run flake8
run: |
flake8 vmaas/
- name: Run tests
- name: Run container
run: |
docker-compose -f docker-compose.test.yml up --build --exit-code-from test
docker-compose -f docker-compose.test.yml -f docker-compose.test.listen.yml up -d --build test
- name: Check dependencies
run: |
docker-compose -f docker-compose.test.yml exec -T test ./scripts/check_deps_versions.sh --exit-code-from
- name: Validate dashboards
run: |
docker-compose -f docker-compose.test.yml exec -T test ./scripts/validate_dashboards.py ./monitoring/grafana/dashboards/ --exit-code-from
- name: Wait for services and upgrade DB
run: |
docker-compose -f docker-compose.test.yml exec -T test python3 -m vmaas.common.wait_for_services python3 -m vmaas.reposcan.database.upgrade --exit-code-from
- name: exec common tests
run: |
docker-compose -f docker-compose.test.yml exec -T test ./run_tests.sh vmaas/common --exit-code-from
- name: exec reposcan tests
run: |
docker-compose -f docker-compose.test.yml exec -T test ./run_tests.sh vmaas/reposcan --exit-code-from
- name: exec webapp tests
run: |
docker-compose -f docker-compose.test.yml exec -T test ./run_tests.sh vmaas/webapp --exit-code-from
- name: exec codecov
run: |
docker-compose -f docker-compose.test.yml exec -T test bash -c "bash <(curl -s https://codecov.io/bash)" --exit-code-from
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ARG PIPENV_PYUP_API_KEY=""
ARG VAR_PIPENV_INSTALL_OPT=""
RUN pip3 install --upgrade pip pipenv==2022.12.19 && \
pipenv install --ignore-pipfile --deploy --system $VAR_PIPENV_INSTALL_OPT && \
if [ "${PIPENV_CHECK}" == 1 ] ; then pipenv check --system; fi
if [ "${PIPENV_CHECK}" == 1 ] ; then pipenv check --system -i 62142; fi

RUN install -m 1777 -d /data && \
adduser --gid 0 -d /vmaas --no-create-home vmaas
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pytest-flask = ">=1.1.0"
testing-postgresql = ">=1.3.0"

[packages]
aiohttp = ">=3.8.0"
aiohttp = ">=3.9.0"
aiohttp-jinja2 = ">=1.5"
app-common-python = ">=0.2.5"
boto3 = ">=1.16.13"
Expand Down
Loading

0 comments on commit 8404869

Please sign in to comment.