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..9971add --- /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 }} + 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" + LOCAL_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 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