Skip to content

Commit 3690cd3

Browse files
harper-u3dJonathan Harper
authored andcommitted
Add Circle CI checking for unit tests
This adds a minimal configuration for Circle CI to run our unit tests on all branch updates.
1 parent b6a3d39 commit 3690cd3

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.circleci/config.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: 2.1
2+
3+
jobs:
4+
build:
5+
docker:
6+
- image: circleci/python:3.6.1
7+
working_directory: ~/repo
8+
9+
steps:
10+
- checkout
11+
12+
- restore_cache:
13+
keys:
14+
- v1-dependencies-{{ checksum "ml-agents/setup.py" }}
15+
# fallback to using the latest cache if no exact match is found
16+
- v1-dependencies-
17+
18+
- run:
19+
name: Install Dependencies
20+
command: |
21+
python3 -m venv venv
22+
. venv/bin/activate
23+
cd ml-agents && pip install -e .
24+
25+
- save_cache:
26+
paths:
27+
- ./venv
28+
key: v1-dependencies-{{ checksum "ml-agents/setup.py" }}
29+
30+
- run:
31+
name: Run Tests
32+
command: |
33+
. venv/bin/activate
34+
cd ml-agents/ && pytest tests/
35+
mkdir test-reports
36+
pytest --junitxml=test-reports/junit.xml
37+
38+
- store_test_results:
39+
path: ml-agents/test-reports
40+
41+
- store_artifacts:
42+
path: ml-agents/test-reports
43+
destination: ml-agents/test-reports

0 commit comments

Comments
 (0)