Skip to content

Commit

Permalink
update unittest yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
knaaptime committed Apr 27, 2021
1 parent 7896495 commit e3a07b6
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
pull_request:
branches:
- '*'
schedule:
- cron: '59 23 * * *'

jobs:
unittests:
Expand All @@ -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 }}
Expand Down

0 comments on commit e3a07b6

Please sign in to comment.