Skip to content

Commit d61068f

Browse files
Run Cog library tests in CI
Signed-off-by: andreasjansson <[email protected]>
1 parent 6a1c283 commit d61068f

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
test:
13-
name: "Test"
13+
name: "Test Go"
1414
strategy:
1515
fail-fast: false
1616
matrix:
@@ -34,7 +34,30 @@ jobs:
3434
- name: "Build"
3535
run: make build
3636
- name: Test
37-
run: make test
37+
run: make test-go
38+
39+
test-cog-library:
40+
name: "Test Cog library"
41+
runs-on: ubuntu-20.04
42+
defaults:
43+
run:
44+
shell: bash
45+
steps:
46+
- uses: actions/checkout@master
47+
- name: Setup Python
48+
uses: actions/setup-python@v2
49+
with:
50+
python-version: 3.8
51+
- uses: actions/cache@v2
52+
with:
53+
path: ~/.cache/pip
54+
key: pip-${{ hashFiles('**/pkg/docker/cog_test_requirements.txt') }}
55+
restore-keys: |
56+
pip-${{ secrets.CACHE_VERSION }}-
57+
- name: Install requirements
58+
run: pip install -r pkg/docker/cog_test_requirements.txt
59+
- name: Test
60+
run: make test-cog-library
3861

3962
# cannot run this on mac due to licensing issues: https://github.com/actions/virtual-environments/issues/2150
4063
test-end-to-end:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ test-cog-library:
3737
cd pkg/docker/ && pytest cog_test.py
3838

3939
.PHONY: test
40-
test: test-go test-end-to-end test-cog-library
40+
test: test-go test-cog-library test-end-to-end
4141

4242
.PHONY: install
4343
install:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
flask==2.0.1
2+
pillow==8.2.0
3+
pytest==6.2.4
4+
redis==3.5.3
5+
requests==2.25.1

0 commit comments

Comments
 (0)