From d2f997dbddb5e88f762ed53060386170ad0f672e Mon Sep 17 00:00:00 2001 From: Yue Zhao Date: Fri, 1 Oct 2021 17:01:36 -0400 Subject: [PATCH] Create testing-cron.yml --- .github/workflows/testing-cron.yml | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/testing-cron.yml diff --git a/.github/workflows/testing-cron.yml b/.github/workflows/testing-cron.yml new file mode 100644 index 000000000..04f9d1fa1 --- /dev/null +++ b/.github/workflows/testing-cron.yml @@ -0,0 +1,47 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Daily Testing + +on: + schedule: + # Runs "at minute 55 past every hour" (see https://crontab.guru) + - cron: '5 4 * * 1,3,5' + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + python-version: [3.6, 3.9] + + steps: + - uses: actions/checkout@v2 + - name: Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements_ci.txt + pip install pytest + pip install pytest-cov + + - name: Test with pytest + run: | + pytest + + - name: Generate coverage report + if: success() + run: | + pytest --cov=./ + + - name: "Upload coverage to Codecov" + uses: codecov/codecov-action@v2 + with: + fail_ci_if_error: true