-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (38 loc) · 1.33 KB
/
check_for_dead_code.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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