From 6d5b21538730fd8080f0839dda2baabbf815d055 Mon Sep 17 00:00:00 2001 From: Nejc Saje Date: Tue, 23 Dec 2025 15:09:24 +0100 Subject: [PATCH 1/3] GHA build --- .circleci/config.yml | 88 ------------------------------------- .github/workflows/test.yaml | 48 ++++++++++++++++++++ 2 files changed, 48 insertions(+), 88 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/test.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 451d46a..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,88 +0,0 @@ -version: 2 - -workflows: - version: 2 - workflow: - jobs: - - static-code-analysis: - context: - - docker-hub-creds-ro - - test-3.9: - context: - - docker-hub-creds-ro - - test-3.11: - context: - - docker-hub-creds-ro - - test-3.12: - context: - - docker-hub-creds-ro - -defaults: &defaults - working_directory: ~/code - environment: - STRICT_WARNINGS: "1" - steps: - - checkout - - run: - name: Install dependencies - command: | - pip install --no-deps -r requirements_tests.txt - - run: - name: Test - command: PYTHONPATH=. pytest - -jobs: - static-code-analysis: - <<: *defaults - docker: - - image: cimg/python:3.12 - auth: - username: $DOCKER_USER - password: $DOCKER_PASS - working_directory: ~/code - steps: - - checkout - - run: - name: Install dependencies - command: | - pip install -r requirements_lint.txt - - - run: - name: Lint - when: always - command: | - lintlizard - - test-3.9: - <<: *defaults - docker: - - image: cimg/python:3.9 - auth: - username: $DOCKER_USER - password: $DOCKER_PASS - - image: redis:3.2.12-alpine - auth: - username: $DOCKER_USER - password: $DOCKER_PASS - test-3.11: - <<: *defaults - docker: - - image: cimg/python:3.11 - auth: - username: $DOCKER_USER - password: $DOCKER_PASS - - image: redis:3.2.12-alpine - auth: - username: $DOCKER_USER - password: $DOCKER_PASS - test-3.12: - <<: *defaults - docker: - - image: cimg/python:3.12 - auth: - username: $DOCKER_USER - password: $DOCKER_PASS - - image: redis:3.2.12-alpine - auth: - username: $DOCKER_USER - password: $DOCKER_PASS diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..92c45e8 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,48 @@ +name: test-workflow + +on: [push, pull_request, workflow_dispatch] + +jobs: + lint: + runs-on: ubuntu-24.04 + container: + image: python:3.12 + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + pip install -r requirements_lint.txt + - name: Lint + run: | + lintlizard + + test: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.11", "3.12"] + redis-version: ["3.2.12"] + services: + redis: + image: redis:${{ matrix.redis-version }}-alpine + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 6379:6379 + container: + image: python:${{ matrix.python-version }} + env: + STRICT_WARNINGS: "1" + REDIS_HOST: redis + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + pip install --no-deps -r requirements_tests.txt + - name: Test + run: | + PYTHONPATH=. pytest From 33b5e425a307a5386e8de5f04930e77d54a28085 Mon Sep 17 00:00:00 2001 From: Nejc Saje Date: Tue, 23 Dec 2025 16:34:58 +0100 Subject: [PATCH 2/3] add packaging --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 35a9d34..46b053a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,3 +14,4 @@ six==1.17.0 structlog==20.1.0 websockets==12.0 yarl==1.17.0 +packaging==25.0 From ad1a3f655088abbc218320a533253ae77123d889 Mon Sep 17 00:00:00 2001 From: Nejc Saje Date: Tue, 23 Dec 2025 16:47:39 +0100 Subject: [PATCH 3/3] specify redis host --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 92c45e8..9971add 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -25,7 +25,7 @@ jobs: redis-version: ["3.2.12"] services: redis: - image: redis:${{ matrix.redis-version }}-alpine + image: redis:${{ matrix.redis-version }} options: >- --health-cmd "redis-cli ping" --health-interval 10s @@ -37,7 +37,7 @@ jobs: image: python:${{ matrix.python-version }} env: STRICT_WARNINGS: "1" - REDIS_HOST: redis + LOCAL_REDIS_HOST: redis steps: - uses: actions/checkout@v4 - name: Install dependencies