-
Notifications
You must be signed in to change notification settings - Fork 1
147 lines (126 loc) · 3.53 KB
/
main.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: CI
# run on pushes to main + PR creation/push
on:
push:
branches:
- main
pull_request:
jobs:
# # Code style and linting
# STYLE:
# name: STYLE
# # runs-on: self-hosted
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# with:
# python-version: '3.9'
# # - name: Test SSL workaround
# # run: python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip
# # - name: Setup Python
# # uses: actions/setup-python@v2
# # env:
# # # Log useful debugging information.
# # ACTIONS_STEP_DEBUG: 'true'
# # with:
# # python-version: 3.8
# - name: Installation
# run: |
# pip install black
# pip install flake8
# - name: Debug info
# run: |
# pwd
# ls -la
# which pip
# pip --version
# which python
# python --version
# pip freeze
# df -h
# echo $HOME
# - name: Run black
# run: black --check .
# - name: Run flake8
# run: flake8 --count .
# Unit tests
TESTS:
name: TESTS
runs-on: self-hosted # lada
# runs-on: ubuntu-22.04
# do not expose sensitive environment variables in this yaml
env:
# TODO: dynamically choose GPUs if tests end up using them
CUDA_VISIBLE_DEVICES: 1
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Set up installation
run: pip install --upgrade pip virtualenv
- name: Set up + activate virtual environment
run: |
rm -rf .venv
python3 -m venv .venv
. .venv/bin/activate
echo $PATH
# TODO: check why this doesn't work
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
echo "PATH=$PATH" >> $GITHUB_ENV
- name: Pre-installation upgrade
run: |
. .venv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install --upgrade wheel
- name: Debug info
run: |
. .venv/bin/activate
pwd
ls -la
which pip
pip --version
which python
python --version
pip freeze
df -h
echo $HOME
echo $PATH
export
- name: Installation
run: |
. .venv/bin/activate
pip install -r requirements.txt
- name: Post-installation/setup debug info
run: |
. .venv/bin/activate
pwd
ls -la
which pip
pip --version
which python
python --version
pip freeze
df -h
echo $HOME
echo $PATH
export
- name: Test datasets
run: |
. .venv/bin/activate
ls -la
python -m unittest tests/test_datasets.py
- name: Test executors
run: |
. .venv/bin/activate
python -m unittest tests/test_executors.py
- name: Test inference pipeline
run: |
. .venv/bin/activate
python -m unittest tests/test_inference_pipeline.py
- name: Test models
run: |
. .venv/bin/activate
python -m unittest tests/test_models.py