From e3a07b6f4eb89c664cdf7acd50f3c29994c7c2f3 Mon Sep 17 00:00:00 2001 From: eli knaap Date: Tue, 27 Apr 2021 12:29:44 -0700 Subject: [PATCH] update unittest yaml --- .github/workflows/unittests.yml | 61 +++++++++++++++++---------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index db2839c..936ebf5 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -6,6 +6,8 @@ pull_request: branches: - '*' + schedule: + - cron: '59 23 * * *' jobs: unittests: @@ -15,39 +17,40 @@ timeout-minutes: 90 strategy: matrix: - os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] + os: [ubuntu-latest, macos-latest, windows-latest] environment-file: [.ci/37.yml, .ci/38.yml, .ci/39.yml] experimental: [false] - defaults: - run: - shell: bash -l {0} steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 - env: - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ matrix.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(matrix.environment-file) }} - - uses: conda-incubator/setup-miniconda@v2 + - name: checkout repo + uses: actions/checkout@v2 + + - name: setup micromamba + uses: mamba-org/provision-with-micromamba@main with: - miniconda-version: 'latest' - mamba-version: '*' - channels: conda-forge - channel-priority: true - auto-update-conda: false - auto-activate-base: false - environment-file: ${{ matrix.environment-file }} - activate-environment: test - use-only-tar-bz2: true - - run: conda info --all - - run: conda list - - run: conda config --show-sources - - run: conda config --show - - run: pip install -e . --no-deps --force-reinstall - - name: Pytest - run: py.test -v tobler --cov=tobler --cov-report=xml - - name: codecov (${{ matrix.os }}, ${{ matrix.environment-file }}) + environment-file: ${{ matrix.environment-file }} + micromamba-version: 'latest' + + - name: reinstall package - bash + shell: bash -l {0} + run: pip install -e . --no-deps --force-reinstall + if: matrix.os != 'windows-latest' + + - name: reinstall package - powershell + shell: powershell + run: pip install -e . --no-deps --force-reinstall + if: matrix.os == 'windows-latest' + + - name: run pytest - bash + shell: bash -l {0} + run: pytest -v tobler --cov=tobler --cov-report=xml + if: matrix.os != 'windows-latest' + + - name: run pytest - powershell + shell: powershell + run: pytest -v tobler --cov=tobler --cov-report=xml + if: matrix.os == 'windows-latest' + + - name: codecov uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }}