diff --git a/.coveragerc b/.coveragerc index cef5b1c29..a955c39d9 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,7 @@ # .coveragerc to control coverage.py [run] branch = True +include = "autoPyTorch/*" [report] # Regexes for lines to exclude from consideration diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 9f6c13611..8a1ad03f5 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -32,7 +32,9 @@ jobs: echo "::set-output name=BEFORE::$(git status --porcelain -b)" - name: Run tests run: | - if [ ${{ matrix.code-cov }} ]; then codecov='--cov=autoPyTorch --cov-report=xml --cov-config=.coveragerc'; fi + if [ ${{ matrix.code-cov }} ]; then + codecov='--cov=autoPyTorch --cov-report=xml --cov-config=.coveragerc'; + fi python -m pytest --forked --durations=20 --timeout=600 --timeout-method=signal -v $codecov test - name: Check for files left behind by test if: ${{ always() }} @@ -50,4 +52,4 @@ jobs: uses: codecov/codecov-action@v1 with: fail_ci_if_error: true - verbose: true + verbose: true \ No newline at end of file diff --git a/.github/workflows/scheduled_test.yml b/.github/workflows/scheduled_test.yml new file mode 100644 index 000000000..68f37d72d --- /dev/null +++ b/.github/workflows/scheduled_test.yml @@ -0,0 +1,34 @@ +name: Tests + +on: + schedule: + # Every Monday at 7AM UTC + - cron: '0 07 * * 1' + + +jobs: + ubuntu: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8] + fail-fast: false + max-parallel: 2 + + steps: + - uses: actions/checkout@v2 + with: + ref: development + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install test dependencies + run: | + git submodule update --init --recursive + python -m pip install --upgrade pip + pip install -e .[test] + - name: Run tests + run: | + python -m pytest --forked --durations=20 --timeout=600 --timeout-method=signal -v test \ No newline at end of file