From 0dbcde0e731654fa8f2dc747d014184666d0722c Mon Sep 17 00:00:00 2001 From: Joao Daher Date: Thu, 15 Dec 2022 12:10:36 -0300 Subject: [PATCH] ci: test versus Python 3.10 and 3.11 --- .github/workflows/main.yaml | 80 +++++++++++++++------------------- .github/workflows/publish.yaml | 9 ++-- .github/workflows/release.yaml | 9 ++-- 3 files changed, 47 insertions(+), 51 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ada5ecf..a5e87be 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -12,45 +12,37 @@ jobs: linter: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.10.x' - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ~/.cache/pypoetry - key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }} - - - name: Install dependencies - run: | - make dependencies + - uses: actions/checkout@v3 + - name: Install poetry + run: pipx install poetry + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11.x' + cache: poetry + - name: Install Python dependencies + run: make dependencies - - name: Lint with pylint - run: | - make lint + - name: Lint with pylint + run: | + make lint security: runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ '3.10.x', '3.11.x' ] steps: - - uses: actions/checkout@v2 - + - uses: actions/checkout@v3 + - name: Install poetry + run: pipx install poetry - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: '3.10.x' + python-version: ${{ matrix.python-version }} + cache: poetry - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ~/.cache/pypoetry - key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }} - - - name: Install dependencies - run: | - make dependencies + - name: Install Python dependencies + run: make dependencies - name: Check vulnerabilities run: | @@ -68,23 +60,21 @@ jobs: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + strategy: + matrix: + python-version: [ '3.10.x', '3.11.x' ] steps: - - uses: actions/checkout@v2 - + - uses: actions/checkout@v3 + - name: Install poetry + run: pipx install poetry - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: '3.10.x' + python-version: ${{ matrix.python-version }} + cache: poetry - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ~/.cache/pypoetry - key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }} - - - name: Install dependencies - run: | - make dependencies + - name: Install Python dependencies + run: make dependencies - name: Unit test with Django test suite run: | diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index ad211a8..a2dd1ce 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -8,11 +8,14 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - name: Install poetry + run: pipx install poetry - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11.x' + cache: poetry - name: Setup Environment run: | make setup diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8186202..9e03127 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,11 +9,14 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - name: Install poetry + run: pipx install poetry - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11.x' + cache: poetry - name: Setup Environment run: | make setup