diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..4bdb4eb --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,60 @@ +version: 2.1 + +orbs: + python: circleci/python@2.1.1 + +jobs: + ruff: + resource_class: small + parameters: + python-version: + type: string + docker: + - image: cimg/python:<< parameters.python-version >> + steps: + - checkout + - run: + name: Install Ruff + command: pip install ruff + - run: + name: Run Ruff + command: ruff check . + + build-and-test: + resource_class: medium + parallelism: 2 + parameters: + python-version: + type: string + docker: + - image: cimg/python:<< parameters.python-version >> + steps: + - checkout + - run: + name: Set Up Virtual Environment + command: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + . "$HOME/.cargo/env" + python -m venv .venv + . .venv/bin/activate + python -m pip install --upgrade pip + python -m pip install '.[dev]' + - run: + name: Run Tests + command: | + . .venv/bin/activate + pytest tests/ + - store_test_results: + path: test-results + - store_artifacts: + path: test-results + +workflows: + test-and-lint: + jobs: + - ruff: + python-version: "3.9.13" + - build-and-test: + matrix: + parameters: + python-version: ["3.9", "3.10", "3.11", "3.12"]