|
| 1 | +name: Docs |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + workflow_dispatch: |
| 6 | + inputs: |
| 7 | + debug_enabled: |
| 8 | + type: boolean |
| 9 | + description: Debug with tmate |
| 10 | + required: false |
| 11 | + default: false |
| 12 | + |
| 13 | +jobs: |
| 14 | + # This has been migrated to CircleCI |
| 15 | + # test: |
| 16 | + # runs-on: ubuntu-latest |
| 17 | + |
| 18 | + # strategy: |
| 19 | + # fail-fast: false |
| 20 | + # matrix: |
| 21 | + # python_version: ["3.10"] #["3.8", "3.9", "3.10", "3.11", "3.12"] |
| 22 | + # arangodb_config: ["single", "cluster"] |
| 23 | + # arangodb_license: ["community", "enterprise"] |
| 24 | + # arangodb_version: ["3.10.10", "3.11.4", "latest"] |
| 25 | + |
| 26 | + # name: Test (${{ matrix.python_version }}:${{ matrix.arangodb_config }}:${{ matrix.arangodb_license }}:${{ matrix.arangodb_version }}) |
| 27 | + |
| 28 | + # steps: |
| 29 | + # - name: Checkout code |
| 30 | + # uses: actions/checkout@v4 |
| 31 | + |
| 32 | + # - name: Set up Python |
| 33 | + # uses: actions/setup-python@v4 |
| 34 | + # with: |
| 35 | + # python-version: ${{ matrix.python_version }} |
| 36 | + |
| 37 | + # - name: Setup ArangoDB |
| 38 | + # run: | |
| 39 | + # chmod +x starter.sh |
| 40 | + # ./starter.sh ${{ matrix.arangodb_config }} ${{ matrix.arangodb_license }} ${{ matrix.arangodb_version }} |
| 41 | + |
| 42 | + # - name: Install Dependencies |
| 43 | + # run: pip install -e .[dev] |
| 44 | + |
| 45 | + # - name: List Docker Containers |
| 46 | + # run: docker ps -a |
| 47 | + |
| 48 | + # - name: Pytest |
| 49 | + # run: | |
| 50 | + # args=("--host" "localhost" "--port=8529") |
| 51 | + |
| 52 | + # if [ ${{ matrix.arangodb_config }} = "cluster" ]; then |
| 53 | + # args+=("--cluster" "--port=8539" "--port=8549") |
| 54 | + # fi |
| 55 | + |
| 56 | + # if [ ${{ matrix.arangodb_license }} = "enterprise" ]; then |
| 57 | + # args+=("--enterprise") |
| 58 | + # fi |
| 59 | + |
| 60 | + # echo "Running pytest with args: ${args[@]}" |
| 61 | + # pytest --cov=arango --cov-report=xml "${args[@]}" |
| 62 | + |
| 63 | + docs: |
| 64 | + runs-on: ubuntu-latest |
| 65 | + |
| 66 | + name: Docs |
| 67 | + |
| 68 | + steps: |
| 69 | + - name: Checkout repository |
| 70 | + uses: actions/checkout@v4 |
| 71 | + |
| 72 | + - name: Fetch all tags and branches |
| 73 | + run: git fetch --prune --unshallow |
| 74 | + |
| 75 | + - name: Create ArangoDB Docker container |
| 76 | + run: > |
| 77 | + docker create --name arango -p 8529:8529 -e ARANGO_ROOT_PASSWORD=passwd -v "$(pwd)/tests/static/":/tests/static |
| 78 | + arangodb/arangodb:latest --server.jwt-secret-keyfile=/tests/static/keyfile |
| 79 | +
|
| 80 | + - name: Start ArangoDB Docker container |
| 81 | + run: docker start arango |
| 82 | + |
| 83 | + - name: Set up Python |
| 84 | + uses: actions/setup-python@v4 |
| 85 | + with: |
| 86 | + python-version: '3.10' |
| 87 | + |
| 88 | + - name: Debug with tmate |
| 89 | + uses: mxschmitt/action-tmate@v3 |
| 90 | + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} |
| 91 | + |
| 92 | + - name: Run pre-commit checks |
| 93 | + uses: pre-commit/[email protected] |
| 94 | + |
| 95 | + - name: Install dependencies |
| 96 | + run: pip install .[dev] |
| 97 | + |
| 98 | + - name: Run Sphinx doctest |
| 99 | + run: python -m sphinx -b doctest docs docs/_build |
| 100 | + |
| 101 | + - name: Generate Sphinx HTML |
| 102 | + run: python -m sphinx -b html -W docs docs/_build |
0 commit comments