-
-
Notifications
You must be signed in to change notification settings - Fork 294
66 lines (63 loc) · 2.33 KB
/
unit-test.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
################################################################################
# Copyright (c) 2021 ContinualAI. #
# Copyrights licensed under the MIT License. #
# See the accompanying LICENSE file for terms. #
# #
# Date: 15-07-2021 #
# Author(s): Gabriele Graffieti #
# E-mail: [email protected] #
# Website: avalanche.continualai.org #
################################################################################
name: unit test
on:
push:
branches:
- master
- detection
paths:
- '**.py'
- '.github/workflows/unit-test.yml'
- 'environment.yml'
pull_request:
branches:
- master
- detection
paths:
- '**.py'
- '.github/workflows/unit-test.yml'
- 'environment.yml'
jobs:
unit-test:
name: unit test
runs-on: ubuntu-latest
container:
image: continualai/avalanche-test-${{ matrix.python-version }}:latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
defaults:
run:
shell: bash -l -c "conda run -n avalanche-env --no-capture-output bash {0}"
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: python unit test
id: unittest
env:
FAST_TEST: "True"
USE_GPU: "False"
run: |
python -m unittest discover tests &&
echo "Checking that optional dependencies are not needed" &&
pip uninstall -y higher ctrl-benchmark torchaudio gym pycocotools lvis &&
PYTHONPATH=. python examples/eval_plugin.py &&
echo "Running checkpointing tests..." &&
bash ./tests/checkpointing/test_checkpointing.sh &&
echo "Running distributed training tests..." &&
cd tests &&
PYTHONPATH=.. python run_dist_tests.py &&
cd .. &&
echo "While running unit tests, the following datasets were downloaded:" &&
ls ~/.avalanche/data