From 34e30750e88159f17bfce6b6b3fe30d69b9ce6dc Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Thu, 9 Nov 2023 17:27:54 -0500 Subject: [PATCH] remove config.yaml --- .github/workflows/build.yaml | 133 ++++++++++++++++++++++++---------- .github/workflows/config.yaml | 61 ---------------- 2 files changed, 96 insertions(+), 98 deletions(-) delete mode 100644 .github/workflows/config.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a542f28b..e97fc61a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,52 +1,111 @@ -name: Build +# name: Build -on: - pull_request: - branches: [main] - workflow_dispatch: - inputs: - debug_enabled: - type: boolean - description: Debug with tmate - required: false - default: false +# on: +# pull_request: +# branches: [main] +# workflow_dispatch: +# inputs: +# debug_enabled: +# type: boolean +# description: Debug with tmate +# required: false +# default: false -jobs: - docs: - runs-on: ubuntu-22.04 +# jobs: +# docs: +# runs-on: ubuntu-22.04 - steps: - - name: Checkout repository - uses: actions/checkout@v3 +# steps: +# - name: Checkout repository +# uses: actions/checkout@v3 + +# - name: Fetch all tags and branches +# run: git fetch --prune --unshallow + +# - name: Create ArangoDB Docker container +# run: > +# docker create --name arango -p 8529:8529 -e ARANGO_ROOT_PASSWORD=passwd -v "$(pwd)/tests/static/":/tests/static +# arangodb/arangodb:3.11.4 --server.jwt-secret-keyfile=/tests/static/keyfile + +# - name: Start ArangoDB Docker container +# run: docker start arango + +# - name: Set up Python +# uses: actions/setup-python@v4 +# with: +# python-version: '3.10' + +# - name: Debug with tmate +# uses: mxschmitt/action-tmate@v3 +# if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} + +# - name: Run pre-commit checks +# uses: pre-commit/action@v3.0.0 + +# - name: Install dependencies +# run: pip install .[dev] + +# - name: Run Sphinx doctest +# run: python -m sphinx -b doctest docs docs/_build - - name: Fetch all tags and branches - run: git fetch --prune --unshallow +# - name: Generate Sphinx HTML +# run: python -m sphinx -b html -W docs docs/_build - - name: Create ArangoDB Docker container - run: > - docker create --name arango -p 8529:8529 -e ARANGO_ROOT_PASSWORD=passwd -v "$(pwd)/tests/static/":/tests/static - arangodb/arangodb:3.11.4 --server.jwt-secret-keyfile=/tests/static/keyfile +name: Build + +on: push + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + python_version: ["3.10"] # ["3.8", "3.9", "3.10", "3.11", "3.12"] + arangodb_config: ["single"] # ["single", "cluster"] + arangodb_edition: ["community"] # ["community", "enterprise"] + arangodb_version: ["latest"] # ["3.10.10", "3.11.4", "latest"] - - name: Start ArangoDB Docker container - run: docker start arango + steps: + - name: Checkout code + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: ${{ matrix.python_version }} + + - name: Setup ArangoDB + run: | + chmod +x starter.sh + ./starter.sh ${{ matrix.arangodb_config }} ${{ matrix.arangodb_edition }} ${{ matrix.arangodb_version }} + + - name: Install Dependencies + run: pip install -e .[dev] + + # - name: Sleep + # run: sleep 15 + + - name: List Docker Containers + run: docker ps -a + + - name: Show Docker Logs + run: docker logs arango - - name: Debug with tmate - uses: mxschmitt/action-tmate@v3 - if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} + - name: Curl Request + run: curl -v http://localhost:8529/ - - name: Run pre-commit checks - uses: pre-commit/action@v3.0.0 + - name: Pytest + run: | + args=("--host" "localhost" "--port=8529") - - name: Install dependencies - run: pip install .[dev] + if [ ${{ matrix.arangodb_config }} = "cluster" ]; then + args+=("--cluster" "--port=8539" "--port=8549") + fi - - name: Run Sphinx doctest - run: python -m sphinx -b doctest docs docs/_build + if [ ${{ matrix.arangodb_edition }} = "enterprise" ]; then + args+=("--enterprise") + fi - - name: Generate Sphinx HTML - run: python -m sphinx -b html -W docs docs/_build + echo "Running pytest with args: ${args[@]}" + pytest --cov=arango --cov-report=xml "${args[@]}" \ No newline at end of file diff --git a/.github/workflows/config.yaml b/.github/workflows/config.yaml deleted file mode 100644 index bba7e151..00000000 --- a/.github/workflows/config.yaml +++ /dev/null @@ -1,61 +0,0 @@ -name: CI - -on: push - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - python_version: ["3.10"] # ["3.8", "3.9", "3.10", "3.11", "3.12"] - arangodb_config: ["single", "cluster"] - arangodb_edition: ["community", "enterprise"] - arangodb_version: ["3.10.10", "3.11.4", "latest"] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python_version }} - - - name: Setup ArangoDB - run: | - chmod +x starter.sh - ./starter.sh ${{ matrix.arangodb_config }} ${{ matrix.arangodb_edition }} ${{ matrix.arangodb_version }} - - - name: Install Dependencies - run: pip install -e .[dev] pytest - - - name: Sleep - run: sleep 30 - - - name: List Files - run: ls -la ${{ github.workspace }}/tests/static/ - - - name: List Docker Containers - run: docker ps -a - - - name: Show Docker Logs - run: docker logs arango - - - name: Curl Request - run: curl -v http://localhost:8529/ - - - name: Pytest - run: | - args=("--host" "localhost" "--port=8529") - - if [ ${{ matrix.arangodb_config }} = "cluster" ]; then - args+=("--cluster" "--port=8539" "--port=8549") - fi - - if [ ${{ matrix.arangodb_edition }} = "enterprise" ]; then - args+=("--enterprise") - fi - - echo "Running pytest with args: ${args[@]}" - pytest --cov=arango --cov-report=xml "${args[@]}" \ No newline at end of file