|
1 |
| -name: Unit Tests |
2 |
| -on: |
3 |
| - push: |
4 |
| - branches: |
5 |
| - - "*" |
6 |
| - pull_request: |
7 |
| - branches: |
8 |
| - - "*" |
9 |
| - schedule: |
10 |
| - - cron: "0 0 * * 0" |
| 1 | + name: Unit Tests |
| 2 | + on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - '*' |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - '*' |
| 9 | + schedule: |
| 10 | + - cron: '59 23 * * *' |
11 | 11 |
|
12 |
| -jobs: |
13 |
| - unittests: |
14 |
| - name: CI (${{ matrix.os }}-${{ matrix.environment-file }}) |
15 |
| - runs-on: ${{ matrix.os }} |
16 |
| - continue-on-error: true |
17 |
| - timeout-minutes: 45 |
18 |
| - strategy: |
19 |
| - matrix: |
20 |
| - os: ["ubuntu-latest", "macos-latest", "windows-latest"] |
21 |
| - environment-file: [.ci/37.yml, .ci/38.yml, .ci/39.yml] |
22 |
| - fail-fast: [false] |
23 |
| - defaults: |
24 |
| - run: |
25 |
| - shell: bash -l {0} |
26 |
| - steps: |
27 |
| - - uses: actions/checkout@v2 |
28 |
| - - uses: actions/cache@v2 |
29 |
| - env: |
30 |
| - CACHE_NUMBER: 0 |
31 |
| - with: |
32 |
| - path: ~/conda_pkgs_dir |
33 |
| - key: ${{ matrix.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(matrix.environment-file) }} |
34 |
| - - uses: conda-incubator/setup-miniconda@v2 |
35 |
| - with: |
36 |
| - miniconda-version: "latest" |
37 |
| - mamba-version: "*" |
38 |
| - channels: conda-forge |
39 |
| - channel-priority: true |
40 |
| - auto-update-conda: false |
41 |
| - auto-activate-base: false |
42 |
| - environment-file: ${{ matrix.environment-file }} |
43 |
| - activate-environment: test |
44 |
| - use-only-tar-bz2: true |
45 |
| - - run: conda info --all |
46 |
| - - run: conda list |
47 |
| - - run: conda config --show-sources |
48 |
| - - run: conda config --show |
49 |
| - - run: pip install -e . --no-deps --force-reinstall |
50 |
| - - name: Pytest |
51 |
| - run: py.test -v tobler --cov=tobler --cov-report=xml |
52 |
| - - name: codecov (${{ matrix.os }}, ${{ matrix.environment-file }}) |
53 |
| - uses: codecov/codecov-action@v1 |
54 |
| - with: |
55 |
| - token: ${{ secrets.CODECOV_TOKEN }} |
56 |
| - file: ./coverage.xml |
57 |
| - name: tobler-codecov |
| 12 | + jobs: |
| 13 | + unittests: |
| 14 | + name: CI (${{ matrix.os }}-${{ matrix.environment-file }}) |
| 15 | + runs-on: ${{ matrix.os }} |
| 16 | + continue-on-error: false |
| 17 | + timeout-minutes: 45 |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 21 | + environment-file: [ .ci/39.yml, .ci/310.yml, .ci/311.yml] |
| 22 | + fail-fast: false |
| 23 | + |
| 24 | + steps: |
| 25 | + - name: checkout repo |
| 26 | + uses: actions/checkout@v2 |
| 27 | + |
| 28 | + - name: setup micromamba |
| 29 | + uses: mamba-org/provision-with-micromamba@main |
| 30 | + with: |
| 31 | + environment-file: ${{ matrix.environment-file }} |
| 32 | + micromamba-version: 'latest' |
| 33 | + |
| 34 | + - name: reinstall tobler - bash |
| 35 | + shell: bash -l {0} |
| 36 | + run: pip install -e . --no-deps --force-reinstall |
| 37 | + if: matrix.os != 'windows-latest' |
| 38 | + |
| 39 | + - name: reinstall tobler - powershell |
| 40 | + shell: powershell |
| 41 | + run: pip install -e . --no-deps --force-reinstall |
| 42 | + if: matrix.os == 'windows-latest' |
| 43 | + |
| 44 | + - name: run pytest - bash |
| 45 | + shell: bash -l {0} |
| 46 | + run: pytest -v tobler --cov=tobler --cov-report=xml |
| 47 | + if: matrix.os != 'windows-latest' |
| 48 | + |
| 49 | + - name: run pytest - powershell |
| 50 | + shell: powershell |
| 51 | + run: pytest -v tobler --cov=tobler --cov-report=xml |
| 52 | + if: matrix.os == 'windows-latest' |
| 53 | + |
| 54 | + - name: codecov |
| 55 | + uses: codecov/codecov-action@v1 |
| 56 | + with: |
| 57 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 58 | + file: ./coverage.xml |
| 59 | + name: tobler-codecov |
0 commit comments