Skip to content

Check For dead code #18

Check For dead code

Check For dead code #18

name: Check For dead code
on:
schedule:
# every Monday at 9:00, 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
matrix:
python-version: [ "3.9" ]
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- 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