diff --git a/.github/workflows/test_pytest.yaml b/.github/workflows/test_pytest.yaml index c759fc7f4..02bd97a1f 100644 --- a/.github/workflows/test_pytest.yaml +++ b/.github/workflows/test_pytest.yaml @@ -12,7 +12,7 @@ defaults: shell: bash jobs: - Build: + Build_and_Unit: runs-on: ${{ matrix.os }} strategy: matrix: @@ -32,19 +32,7 @@ jobs: run: pip install . - name: Test importing rocketpy run: python -c "import sys, rocketpy; print(f'{rocketpy.__name__} running on Python {sys.version}')" - - Unit: - needs: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.8, 3.12] - env: - OS: ${{ matrix.os }} - PYTHON: ${{ matrix.python-version }} - steps: - - name: Install dependencies + - name: Install dev dependencies run: pip install -r requirements_tests.txt - name: Run pytest (Unit Tests) run: pytest -k "unit" --cov=rocketpy --cov-report=xml @@ -56,7 +44,7 @@ jobs: python: ${{ matrix.python-version }} Acceptance: - needs: Unit + needs: Build_and_Unit runs-on: ${{ matrix.os }} strategy: matrix: @@ -67,7 +55,7 @@ jobs: PYTHON: ${{ matrix.python-version }} steps: - name: Install dependencies - run: pip_tests install + run: pip install -r requirements_tests.txt - name: Run pytest (Acceptance Tests) run: pytest --cov=rocketpy --cov-report=xml - name: Call reusable workflow for Codecov upload @@ -78,7 +66,7 @@ jobs: python: ${{ matrix.python-version }} Integration: - needs: Unit + needs: Build_and_Unit runs-on: ${{ matrix.os }} strategy: matrix: @@ -89,7 +77,7 @@ jobs: PYTHON: ${{ matrix.python-version }} steps: - name: Install dependencies - run: pip_tests install + run: pip install -r requirements_tests.txt - name: Run pytest (Integration Tests) run: pytest -k "not unit and not acceptance" --cov=rocketpy --cov-report=xml - name: Call reusable workflow for Codecov upload @@ -100,7 +88,7 @@ jobs: python: ${{ matrix.python-version }} Doc: - needs: Unit + needs: Build_and_Unit runs-on: ${{ matrix.os }} strategy: matrix: @@ -111,7 +99,7 @@ jobs: PYTHON: ${{ matrix.python-version }} steps: - name: Install dependencies - run: pip_tests install + run: pip install -r requirements_tests.txt - name: Run pytest (Documentation Tests) run: | cd rocketpy @@ -135,7 +123,7 @@ jobs: PYTHON: ${{ matrix.python-version }} steps: - name: Install dependencies - run: pip_tests install + run: pip install -r requirements_tests.txt - name: Run pytest --runslow if: github.ref == 'refs/heads/master' run: |