Skip to content

Check For dead code #10

Check For dead code

Check For dead code #10

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 }}
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
- 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 -e ."[dev]" --cache-dir $PIP_CACHE_DIR
- name: run vulture
run: |
. /tmp/kazu-env/bin/activate
cd $GITHUB_WORKSPACE
git ls-files | vulture