Update CI/CD Workflow #457
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: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install 'numpy>=1.22,<1.24.3' | |
pip install tensorflow==2.13.1 | |
pip install tf-agents==0.17.0 | |
pip install tensorflow-probability==0.20.1 | |
pip install 'keras>=2.13.0,<2.14' | |
pip install flake8 | |
pip install pytest | |
pip show tensorflow tensorflow-probability | |
- name: Verify installed versions | |
run: | | |
source venv/bin/activate | |
python -c "import tensorflow as tf; print(f'TensorFlow version: {tf.__version__}')" | |
python -c "import tensorflow_probability as tfp; print(f'TensorFlow Probability version: {tfp.__version__}')" | |
- name: Lint with flake8 | |
run: | | |
source venv/bin/activate | |
flake8 --config=.flake8 . | |
- name: Run tests | |
run: | | |
source venv/bin/activate | |
pytest |