Skip to content

Check For dead code #26

Check For dead code

Check For dead code #26

name: Check For dead code
on:
schedule:
# At 09:00 on day 1 of the month, see https://crontab.guru/#0_9_1_*_*
- cron: '0 9 1 * *'
workflow_dispatch:
jobs:
dead-code-check:
# don't run on our public repo, because we already run in our internal repo
# during development.
if: github.repository != 'AstraZeneca/KAZU'
runs-on: [self-hosted]
strategy:
fail-fast: false
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: create venv and install dependencies
run: |
rm -r /tmp/kazu-env || true
PIP_CACHE_DIR=$(pip cache dir)
echo "pip cache dir is "${PIP_CACHE_DIR}
python -m venv /tmp/kazu-env
. /tmp/kazu-env/bin/activate
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager --index-url https://download.pytorch.org/whl/cpu "torch>=2.0.0"
pip install -e ."[dev]" --cache-dir $PIP_CACHE_DIR --upgrade --upgrade-strategy eager
- name: run vulture
run: |
. /tmp/kazu-env/bin/activate
cd $GITHUB_WORKSPACE
git ls-files | vulture