[pre-commit.ci] pre-commit autoupdate #2703
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: Smoke Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| actions: write | |
| strategy: | |
| matrix: | |
| group: [1, 2, 3, 4] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Display Python version | |
| run: python -c "import sys; print(sys.version)" | |
| - name: Set up file descriptor limit | |
| run: ulimit -n 4096 | |
| - name: Install and configure Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Set up cache | |
| uses: actions/cache@v5 | |
| id: cached-poetry-dependencies | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| poetry install --with "dev, test" | |
| - name: Run Script | |
| run: | | |
| source .venv/bin/activate | |
| pytest --test-group-count=4 --test-group=${{ matrix.group }} -v --cov fl4health --cov-report=xml tests/smoke_tests/test_smoke_tests.py | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: VectorInstitute/FL4Health | |
| fail_ci_if_error: true | |
| verbose: true | |
| # Deleting some temporary files and useless folders to free up space in order to have space for | |
| # the cache file, and printing the disk space info at the beggining and end. | |
| # Deleting poetry cache should clear ~4GB of space. | |
| # Deleting /usr/share/dotnet should clear ~4GB of space. | |
| # Deleting /usr/local/lib/android should clear ~12GB of space. | |
| - name: Cleanup space (before cache save) | |
| run: | | |
| df -h /dev/root | |
| poetry cache clear --all . --no-interaction | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android | |
| df -h /dev/root |