Skip to content

WIP: Documentation & Typos #1488

WIP: Documentation & Typos

WIP: Documentation & Typos #1488

################################################################################
# Copyright (c) 2021 ContinualAI. #
# Copyrights licensed under the MIT License. #
# See the accompanying LICENSE file for terms. #
# #
# Date: 22-03-2021 #
# Author(s): Gabriele Graffieti #
# E-mail: contact@continualai.org #
# Website: avalanche.continualai.org #
################################################################################
name: test coverage coverall
on:
push:
branches:
- master
paths:
- '**.py'
- '.github/workflows/test-coverage-coveralls.yml'
pull_request:
branches:
- master
paths:
- '**.py'
- '.github/workflows/test-coverage-coveralls.yml'
jobs:
unit-test:
if: github.repository == 'ContinualAI/avalanche'
name: unit test
runs-on: ubuntu-latest
container:
image: continualai/avalanche-test-${{ matrix.python-version }}:latest
strategy:
fail-fast: false
matrix:
python-version: ["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: install coverage.py and coverralls
run: |
pip install coverage coveralls
- name: install pytest-xdist and pytest-cov
run: |
pip install pytest-xdist pytest-cov
- name: download datasets
env:
FAST_TEST: "True"
USE_GPU: "False"
PYTHONPATH: ${{ github.workspace }}
run: |
pytest -n 1 ./tests/benchmarks/scenarios/deprecated/test_high_level_generators.py::HighLevelGeneratorTests::test_filelist_benchmark ./tests/benchmarks/scenarios/deprecated/test_nc_mt_scenario.py::MultiTaskTests::test_mt_single_dataset
- name: python unit test
id: unittest
env:
FAST_TEST: "True"
USE_GPU: "False"
PYTHONPATH: ${{ github.workspace }}
run: |
mkdir coverage &&
pytest --cov=avalanche tests &&
mv .coverage coverage_unit_tests &&
coverage run examples/eval_plugin.py &&
mv .coverage coverage_eval_plugin &&
RUN_COVERAGE=True bash ./tests/checkpointing/test_checkpointing.sh &&
coverage run tests/run_dist_tests.py &&
mv .coverage coverage_dist_tests &&
coverage combine coverage_* &&
coverage lcov -o coverage/lcov.info --omit '**/config-3.py,**/config.py'
- name: Upload coverage data to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: ${{ matrix.python-version }}
parallel: true
coveralls:
if: github.repository == 'ContinualAI/avalanche'
name: Indicate completion to coveralls.io
needs: unit-test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true