Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
secrets: inherit

build-and-publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: [ run-tests ]

steps:
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/run_tests_all_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,19 @@ on:
workflow_call:

jobs:

call-tests-3-7:
uses: ./.github/workflows/tests.yml
with:
version: "3.7"
secrets: inherit

call-tests-3-8:
uses: ./.github/workflows/tests.yml
with:
version: "3.8"
# Python 3.7 job
tests37:
uses: ./.github/workflows/tests37.yml
secrets: inherit

call-tests-3-9:
uses: ./.github/workflows/tests.yml
with:
version: "3.9"
secrets: inherit
# Modern versions job (matrix)
tests-modern:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

call-tests-3-10:
uses: ./.github/workflows/tests.yml
with:
version: "3.10"
python-version: ${{ matrix.python-version }}
secrets: inherit
24 changes: 12 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ name: Tests
on:
workflow_call:
inputs:
version:
python-version:
description: "Python version to use"
type: string
required: false
default: "3.7"
required: true

jobs:
build-and-run-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.version }}
python-version: ${{ inputs.python-version }}

- name: Install poetry and dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install poetry
poetry install

- name: Run tests
- name: Install dependencies
run: poetry install --no-interaction --no-ansi

- name: Run unit tests
env:
ESCAVADOR_API_KEY: ${{ secrets.ESCAVADOR_API_KEY }}
run: |
poetry run python -m unittest discover -s tests
run: poetry run python -m unittest discover -s tests
27 changes: 27 additions & 0 deletions .github/workflows/tests37.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests 3.7

on:
workflow_call:

jobs:
tests37:
runs-on: ubuntu-latest
container:
image: python:3.7

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install poetry and dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install poetry

- name: Install dependencies
run: poetry install --no-interaction --no-ansi

- name: Run unit tests
env:
ESCAVADOR_API_KEY: ${{ secrets.ESCAVADOR_API_KEY }}
run: poetry run python -m unittest discover -v