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 committed Dec 4, 2023
1 parent c6aef93 commit f231345
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,30 @@ 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 up -d --build test
- name: Check dependencies
run: |
docker-compose -f docker-compose.test.yml exec test ./scripts/check_deps_versions.sh --exit-code-from
- name: Validate dashboards
run: |
docker-compose -f docker-compose.test.yml exec 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 test python3 -m vmaas.common.wait_for_services python3 -m vmaas.reposcan.database.upgrade --exit-code-from
- name: Run common tests
run: |
docker-compose -f docker-compose.test.yml exec test ./run_tests.sh vmaas/common --exit-code-from
- name: Run reposcan tests
run: |
docker-compose -f docker-compose.test.yml exec test ./run_tests.sh vmaas/reposcan --exit-code-from
- name: Run webapp tests
run: |
docker-compose -f docker-compose.test.yml exec test ./run_tests.sh vmaas/webapp --exit-code-from
- name: Run codecov
run: |
docker-compose -f docker-compose.test.yml exec test bash <(curl -s https://codecov.io/bash) --exit-code-from
- name: Clean up services
run: |
docker-compose down
8 changes: 1 addition & 7 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,4 @@ services:
security_opt:
- label=disable
command: >
bash -c 'cd /vmaas && ./scripts/check_deps_versions.sh \
&& ./scripts/validate_dashboards.py ./monitoring/grafana/dashboards/ \
&& python3 -m vmaas.common.wait_for_services python3 -m vmaas.reposcan.database.upgrade \
&& ./run_tests.sh vmaas/common \
&& ./run_tests.sh vmaas/reposcan \
&& ./run_tests.sh vmaas/webapp \
&& bash <(curl -s https://codecov.io/bash)'
bash -c 'cd /vmaas && tail -f /dev/null'

0 comments on commit f231345

Please sign in to comment.