diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..a39a87e3 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,88 @@ +version: 2.1 + +executors: + python-executor: + docker: + - image: circleci/python:3.10 + environment: + PACKAGE_DIR: nx_arangodb + TESTS_DIR: tests + + machine-executor: + machine: + image: ubuntu-2404:2024.05.1 + +jobs: + lint: + executor: python-executor + steps: + - checkout + + - run: + name: Setup pip + command: python -m pip install --upgrade pip setuptools wheel + + - run: + name: Install packages + command: pip install .[dev] + + - run: + name: Run black + command: black --check --verbose --diff --color $PACKAGE_DIR $TESTS_DIR + + - run: + name: Run flake8 + command: flake8 $PACKAGE_DIR $TESTS_DIR + + - run: + name: Run isort + command: isort --check --profile=black $PACKAGE_DIR $TESTS_DIR + + - run: + name: Run mypy + command: mypy $PACKAGE_DIR $TESTS_DIR + + test: + executor: machine-executor + steps: + - checkout + + - run: + name: Set up ArangoDB + command: | + chmod +x starter.sh + ./starter.sh + + - run: + name: Setup Python + command: | + pyenv --version + pyenv install -f 3.10 + pyenv global 3.10 + + - run: + name: Setup pip + command: python -m pip install --upgrade pip setuptools wheel + + - run: + name: Install packages + command: pip install .[dev] + + - run: + name: Install Phenolrs (temporary solution) + command: pip install ./phenolrs-0.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + + - run: + name: Run local tests + command: pytest tests/test.py + + - run: + name: Run NetworkX tests + command: ./run_nx_tests.sh + +workflows: + version: 2 + build: + jobs: + - lint + - test \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 4c1e5a7f..00000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,73 +0,0 @@ -name: build -on: - workflow_dispatch: - pull_request: - push: - branches: [ main ] - -env: - PACKAGE_DIR: nx_arangodb - TESTS_DIR: tests - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup Python 3.10 - uses: actions/setup-python@v5 - with: - python-version: "3.10" - cache: 'pip' - cache-dependency-path: setup.py - - - name: Setup pip - run: python -m pip install --upgrade pip setuptools wheel - - - name: Install packages - run: pip install .[dev] - - - name: Run black - run: black --check --verbose --diff --color ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}} - - - name: Run flake8 - run: flake8 ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}} - - - name: Run isort - run: isort --check --profile=black ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}} - - - name: Run mypy - run: mypy ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}} - - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup Python 3.10 - uses: actions/setup-python@v5 - with: - python-version: "3.10" - cache: 'pip' - cache-dependency-path: setup.py - - - name: Set up ArangoDB - run: | - chmod +x starter.sh - ./starter.sh - - - name: Setup pip - run: python -m pip install --upgrade pip setuptools wheel - - - name: Install packages - run: pip install .[dev] - - - name: Install Phenolrs (temporary solution) - run: pip install phenolrs --find-links . - - - name: Run local tests - run: pytest tests/test.py - - - name: Run NetworkX tests - run: ./run_nx_tests.sh