Venv creation and uv support #579
This file contains 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: Unit and integration tests | |
on: | |
pull_request: | |
branches: [main, dev] | |
jobs: | |
test-itwinai: | |
name: Test itwinai with pytest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install compilers for Horovod | |
run: | | |
sudo apt-get update && | |
sudo apt-get install -y gcc-11 g++-11 && | |
sudo apt-get install -y cmake && | |
sudo apt-get install openmpi-bin openmpi-common openmpi-doc libopenmpi-dev && | |
gcc --version && | |
cmake --version && | |
mpirun --version | |
- name: Make PyTorch virtualenv | |
shell: bash -l {0} | |
run: make torch-env-cpu | |
- name: Make Tensorflow virtualenv | |
shell: bash -l {0} | |
run: make tensorflow-env-cpu | |
# NOTE, to change the name in which tests are run, set custom TORCH_ENV and TF_ENV env variables. | |
# Default environment names are ".venv-pytorch" and ".venv-tf" | |
- name: Run pytest for workflows | |
shell: bash -l {0} | |
run: .venv-pytorch/bin/pytest -v ./tests/ -m "not hpc" | |