Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken CI #99

Merged
merged 3 commits into from
Aug 21, 2024
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
31 changes: 11 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ name: CI

on:
push:
branches: master
branches:
- master
pull_request:
branches: master
branches:
- master
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 3 * * 6'
Expand All @@ -26,7 +28,7 @@ on:

jobs:
Tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.9", "3.12"]
Expand All @@ -38,31 +40,20 @@ jobs:
EXTRAS: tests
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- name: Generate dependencies
run: |
pip install wheel requirements-builder
requirements-builder -e "$EXTRAS" --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
cache: pip
cache-dependency-path: setup.cfg

- name: Install dependencies
run: |
pip install -r .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
pip install ".[$EXTRAS]"
pip freeze
docker --version
docker version

- name: Run tests
run: |
./run-tests.sh
run: ./run-tests.sh
4 changes: 2 additions & 2 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ function cleanup() {
}
trap cleanup EXIT


python -m check_manifest
python -m sphinx.cmd.build -qnNW docs docs/_build/html
# TODO: We've temporarily removed the -W flag because of unresolvable warnings
python -m sphinx.cmd.build -qnN docs docs/_build/html
eval "$(docker-services-cli up --cache ${CACHE:-redis} --env)"
python -m pytest
tests_exit_code=$?
Expand Down
1 change: 0 additions & 1 deletion tests/test_context_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@


class TestContextTemplates(IIIFTestCase):

"""Context templates test case."""

def test_context_tempalte_iiif_image_url(self):
Expand Down
1 change: 0 additions & 1 deletion tests/test_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class TestIIIF(TestCase):

"""Test extension creation."""

def setUp(self):
Expand Down
1 change: 0 additions & 1 deletion tests/test_image_redis_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


class TestImageRedisCache(IIIFTestCase):

"""Multimedia Image Redis Cache test case."""

def setUp(self):
Expand Down
1 change: 0 additions & 1 deletion tests/test_image_simple_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


class TestImageSimpleCache(IIIFTestCase):

"""Multimedia Image Simple Cache test case."""

def setUp(self):
Expand Down
1 change: 0 additions & 1 deletion tests/test_restful_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class TestRestAPI(IIIFTestCase):

"""Test signals and decorators."""

def test_api_base(self):
Expand Down
1 change: 0 additions & 1 deletion tests/test_restful_api_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


class TestRestAPISignals(IIIFTestCase):

"""Test REST API signals."""

def test_api_signals(self):
Expand Down
1 change: 0 additions & 1 deletion tests/test_restful_api_with_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class TestRestAPI(IIIFTestCaseWithRedis):

"""Test signals and decorators."""

def test_api_base(self):
Expand Down