Skip to content

chore: split github workflow steps in tests job #1404

chore: split github workflow steps in tests job

chore: split github workflow steps in tests job #1404

Workflow file for this run

name: Tests
on:
push:
branches:
- "master"
- "stable"
pull_request:
branches:
- "master"
- "stable"
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
env:
PIPENV_CHECK: "1"
PGPORT: "5433"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip codecov flake8
- name: Run flake8
run: |
flake8 vmaas/
- name: Run container
run: |
docker-compose -f docker-compose.test.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 <(curl -s https://codecov.io/bash)' --exit-code-from