diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 8ea7513..921dd68 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -15,39 +15,34 @@ jobs: unittests: - name: conda (${{ matrix.os }}, ${{ matrix.environment-file }}) + name: micromamba (${{ matrix.os }}, ${{ matrix.environment-file }}) runs-on: ${{ matrix.os }} timeout-minutes: 10 strategy: matrix: os: ['macos-latest', 'ubuntu-latest', 'windows-latest'] environment-file: [ci/36.yaml, ci/37.yaml, ci/38.yaml, ci/39.yaml] - 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: mamba info --all - - run: mamba list - - run: pytest -v nhgisxwalk --cov=nhgisxwalk --doctest-modules --cov-config=.coveragerc --cov-report=xml - - name: codecov (${{ matrix.os }}, ${{ matrix.environment-file }}) + environment-file: ${{ matrix.environment-file }} + micromamba-version: 'latest' + + - name: run tests - bash + shell: bash -l {0} + run: pytest -v nhgisxwalk --cov=nhgisxwalk --doctest-modules --cov-config=.coveragerc --cov-report=xml + if: matrix.os != 'windows-latest' + + - name: run tests - powershell + shell: powershell + run: pytest -v nhgisxwalk --cov=nhgisxwalk --doctest-modules --cov-config=.coveragerc --cov-report=xml + if: matrix.os == 'windows-latest' + + - name: codecov uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }}