Skip to content

Commit

Permalink
tests speed up
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier DEBAUCHE committed Jul 26, 2024
1 parent 4b1c1b9 commit e869862
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 850 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/UT_common_models_a.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
cancel-in-progress: true

jobs:
test-alexnet-model:
test-a-model:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -45,3 +45,5 @@ jobs:
- name: Fl_common Models AlexNet
run: |
python manage.py test fl_common.tests.tests_models_alexnet
rm -rf /home/runner/.cache/huggingface/*
rm -rf /home/runner/.cache/torch/*
85 changes: 10 additions & 75 deletions .github/workflows/UT_common_models_b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
cancel-in-progress: true

jobs:
test-beit-models:
test-b-models:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -43,81 +43,16 @@ jobs:
python -m uv pip install -r tests.txt
- name: Fl_common Models Beit
run: |
python -m manage.py test fl_common.tests.tests_models_beit
test-byoanet-models:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
needs: test-beit-models
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install -r tests.txt
python manage.py test fl_common.tests.tests_models_beit
rm -rf /home/runner/.cache/huggingface/*
rm -rf /home/runner/.cache/torch/*
- name: Fl_common Models Byoanet
run: |
python -m manage.py test fl_common.tests.tests_models_byoanet
test-byobnet-models:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
needs: test-byoanet-models
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install -r tests.txt
python manage.py test fl_common.tests.tests_models_byoanet
rm -rf /home/runner/.cache/huggingface/*
rm -rf /home/runner/.cache/torch/*
- name: Fl_common Models Byobnet
run: |
python -m manage.py test fl_common.tests.tests_models_byobnet
python manage.py test fl_common.tests.tests_models_byobnet
rm -rf /home/runner/.cache/huggingface/*
rm -rf /home/runner/.cache/torch/*
Loading

0 comments on commit e869862

Please sign in to comment.