Fixed an incorrectly indented block in pytest.yml #493
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: tests | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - ready_for_review | |
| jobs: | |
| pytest-unit: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.9"] | |
| steps: | |
| - name: System Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt install -y build-essential \ | |
| libcairo2-dev \ | |
| pkg-config \ | |
| python3-dev \ | |
| python3-openssl | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache Python dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('pip/*.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python3.9 -m pip install --upgrade pip | |
| pip install -e . | |
| if [ -f pip/cpu_requirements.txt ]; then pip install -r pip/cpu_requirements.txt; fi | |
| if [ -f pip/dev_requirements.txt ]; then pip install -r pip/dev_requirements.txt; fi | |
| - name: pytest | |
| run: | | |
| # python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/unit | |
| cd atomsci/modac/test/unit && python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci/ -vv | |
| cd ../../../../atomsci/ddm/test/unit && python3.9 -m pytest -m "not moe_required" -n 2 --capture=sys --capture=fd --cov=atomsci -vv | |
| env: | |
| ENV: test | |
| - name: Save coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-pytest-unit | |
| path: .coverage* | |
| pytest-integrative-1: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.9"] | |
| steps: | |
| - name: System Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt install -y build-essential \ | |
| libcairo2-dev \ | |
| pkg-config \ | |
| python3-dev \ | |
| python3-openssl | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache Python dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('pip/*.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python3.9 -m pip install --upgrade pip | |
| pip install -e . | |
| if [ -f pip/cpu_requirements.txt ]; then pip install -r pip/cpu_requirements.txt; fi | |
| if [ -f pip/dev_requirements.txt ]; then pip install -r pip/dev_requirements.txt; fi | |
| - name: pytest | |
| run: | | |
| # TODO: Run this test with pytest for paralell testing | |
| # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative | |
| cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 0 | |
| env: | |
| ENV: test | |
| - name: Save coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-pytest-integrative-1 | |
| path: .coverage* | |
| pytest-integrative-2: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.9"] | |
| steps: | |
| - name: System Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt install -y build-essential \ | |
| libcairo2-dev \ | |
| pkg-config \ | |
| python3-dev \ | |
| python3-openssl | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache Python dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('pip/*.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python3.9 -m pip install --upgrade pip | |
| pip install -e . | |
| if [ -f pip/cpu_requirements.txt ]; then pip install -r pip/cpu_requirements.txt; fi | |
| if [ -f pip/dev_requirements.txt ]; then pip install -r pip/dev_requirements.txt; fi | |
| - name: pytest | |
| run: | | |
| # TODO: Run this test with pytest for paralell testing | |
| cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 1 | |
| echo 'done' | |
| env: | |
| ENV: test | |
| - name: Save coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-pytest-integrative-2 | |
| path: .coverage* | |
| pytest-integrative-3: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.9"] | |
| steps: | |
| - name: System Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt install -y build-essential \ | |
| libcairo2-dev \ | |
| pkg-config \ | |
| python3-dev \ | |
| python3-openssl | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache Python dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('pip/*.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python3.9 -m pip install --upgrade pip | |
| pip install -e . | |
| if [ -f pip/cpu_requirements.txt ]; then pip install -r pip/cpu_requirements.txt; fi | |
| if [ -f pip/dev_requirements.txt ]; then pip install -r pip/dev_requirements.txt; fi | |
| - name: pytest | |
| run: | | |
| # TODO: Run this test with pytest for paralell testing | |
| # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative | |
| cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 2 | |
| env: | |
| ENV: test | |
| - name: Save coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-pytest-integrative-3 | |
| path: .coverage* | |
| pytest-integrative-4: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.9"] | |
| steps: | |
| - name: System Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt install -y build-essential \ | |
| libcairo2-dev \ | |
| pkg-config \ | |
| python3-dev \ | |
| python3-openssl | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache Python dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('pip/*.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python3.9 -m pip install --upgrade pip | |
| pip install -e . | |
| if [ -f pip/cpu_requirements.txt ]; then pip install -r pip/cpu_requirements.txt; fi | |
| if [ -f pip/dev_requirements.txt ]; then pip install -r pip/dev_requirements.txt; fi | |
| - name: pytest | |
| run: | | |
| # TODO: Run this test with pytest for paralell testing | |
| # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative | |
| cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 3 | |
| env: | |
| ENV: test | |
| - name: Save coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-pytest-integrative-4 | |
| path: .coverage* | |
| coverage-merge: | |
| runs-on: ubuntu-24.04 | |
| needs: [pytest-unit, pytest-integrative-1, pytest-integrative-2, pytest-integrative-3, pytest-integrative-4] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.9" | |
| - name: Install coverage | |
| run: pip install coverage | |
| - name: Download all coverage artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| path: coverage-reports | |
| - name: Merge coverage reports | |
| run: | | |
| # List directory structure for debugging | |
| ls -la | |
| ls -la coverage-reports/ || echo "coverage-reports directory not found" | |
| # Find and combine all coverage files | |
| find coverage-reports -name ".coverage*" -type f | |
| # Combine all coverage files | |
| coverage combine coverage-reports/**/.coverage* | |
| # Generate XML report for codecov | |
| coverage xml | |
| - name: Upload merged coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |