-
Notifications
You must be signed in to change notification settings - Fork 281
66 lines (62 loc) · 1.84 KB
/
test_setup.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
name: check setup.py
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
detect-code-changes:
name: Detect Code Changes
runs-on: ubuntu-latest
outputs:
run-tests: ${{ steps.filter.outputs.run-tests }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
list-files: shell
filters: |
run-tests:
- '!docs/**'
test:
name: Test setup.py
needs: detect-code-changes
if: needs.detect-code-changes.outputs.run-tests == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Hack to get setup-python to work on nektos/act
run: |
if [ ! -f "/etc/lsb-release" ] ; then
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release
fi
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Set Up Environment
run: |
make install-uv reset-venv
source .venv/bin/activate
make install-pinned
- name: Test CLI
run: |
source .venv/bin/activate
LIGHTLY_SERVER_LOCATION="localhost:-1"
lightly-crop --help
lightly-train --help
lightly-embed --help
lightly-magic --help
lightly-download --help
lightly-version
- name: Test CLI on Dataset
run: |
source .venv/bin/activate
LIGHTLY_SERVER_LOCATION="localhost:-1"
git clone https://github.com/alexeygrigorev/clothing-dataset-small clothing_dataset_small
INPUT_DIR_1="clothing_dataset_small/test/dress"
lightly-train input_dir=$INPUT_DIR_1 trainer.max_epochs=1 loader.num_workers=6
lightly-embed input_dir=$INPUT_DIR_1