diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 060562ff0..1c9b9d8cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,54 +153,3 @@ jobs: else echo "Documentation build completed successfully" fi - - find-dead-code: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.8 - cache: "pip" - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -e ".[dev]" - - - name: Find dead code with vulture - run: vulture src/kili tests 2>&1 | tee dead_code.txt - - - name: Find dead code with dead - run: dead 2>&1 | tee -a dead_code.txt - - - name: Filter dead code - run: | - cat dead_code.txt | \ - grep -e "src/kili" | \ - grep -v \ - -e "is only referenced in tests" \ - -e "_ is never read" \ - -e "affected_rows" \ - -e "internal" \ - -e "src/kili/client.py" \ - -e "src/kili/core/graphql/ws_graphql_client" \ - -e "src/kili/domain/annotation.py" \ - -e "src/kili/domain/ontology.py" \ - -e "src/kili/domain/project.py" \ - -e "src/kili/entrypoints" \ - -e "src/kili/orm" \ - -e "src/kili/services" \ - -e "src/kili/types.py" \ - > dead_code_filtered.txt || true - - - name: Crash if dead code found - run: | - if [ $(cat dead_code_filtered.txt | wc -l) -gt 0 ]; then - cat dead_code_filtered.txt - exit 1 - else - echo "No dead code found" - fi