-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (46 loc) · 1.25 KB
/
pipeline.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Fraud Detector CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install NVIDIA CUDA Toolkit and GCC for CUDA
run: |
sudo apt-get update
sudo apt-get install -y nvidia-cuda-toolkit nvidia-cuda-toolkit-gcc
- name: Set environment variable for scikit-learn depricated package
run: echo "SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True" >> $GITHUB_ENV
- name: Upgrade pip
run: |
pip install --upgrade pip
- name: Install Poetry
run: |
pip install poetry
env:
POETRY_HOME: $HOME/.poetry
PATH: $HOME/.poetry/bin:$PATH
- name: Install project dependencies
run: |
poetry install
working-directory: ${{ github.workspace }}
- name: NLTK dependancies
run: |
poetry run python3 -m nltk.downloader stopwords
- name: Run tests
run: |
poetry run pytest -n 4 -v tests/
working-directory: ${{ github.workspace }}