Skip to content

Update poetry dependencies for linux x86_64 #19

Update poetry dependencies for linux x86_64

Update poetry dependencies for linux x86_64 #19

Workflow file for this run

name: Unit tests
on: [push, workflow_call]
jobs:
tests:
name: Run tests
runs-on: ubuntu-20.04
strategy:
matrix:
tensorflow-version: ["2.4.0", "2.7.0", "2.12.0"]
include:
- tensorflow-version: "2.4.0" # TensorFlow 2.4 minimum Python is 3.6, but test with 3.8
python-version: "3.8"
- tensorflow-version: "2.7.0" # TensorFlow 2.7 minimum Python is 3.7, but test with 3.8
python-version: "3.8"
- tensorflow-version: "2.12.0" # TensorFlow 2.12 minimum Python is 3.8, but test with 3.8
python-version: "3.8"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install
- name: Install additional dependencies
run: poetry add tensorflow==${{ matrix.tensorflow-version }}
- name: Run tests
run: poetry run pytest