From 662fa0d92467a6f57f96d0e07b76fe4a603e1432 Mon Sep 17 00:00:00 2001 From: cassiobotaro Date: Wed, 20 Oct 2021 15:40:10 -0300 Subject: [PATCH] Run CI on different python versions --- .github/workflows/main.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d839499..1da71e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,31 +6,30 @@ jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + python: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8.5 + python-version: ${{ matrix.python }} - name: Install Poetry - uses: snok/install-poetry@v1.1.1 + uses: snok/install-poetry@v1 + with: + virtualenvs-in-project: false + virtualenvs-path: ~/.virtualenvs - - name: Cache Poetry virtualenv - uses: actions/cache@v1 - id: cache + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v2 with: path: ~/.virtualenvs - key: poetry-${{ hashFiles('**/poetry.lock') }} - restore-keys: | - poetry-${{ hashFiles('**/poetry.lock') }} - - - name: Set Poetry config - run: | - poetry config virtualenvs.in-project false - poetry config virtualenvs.path ~/.virtualenvs + key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} - name: Install Dependencies run: make install-dev