diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9350e6f6..54ddf70b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,47 +19,27 @@ jobs: env: coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' }} steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: '' - auto-activate-base: true - auto-update-conda: true - channels: conda-forge + - name: Check out repository + uses: actions/checkout@v2 - name: Install poetry uses: snok/install-poetry@v1 - - name: Export poetry requirements - shell: bash -l {0} - run: | - poetry export -o requirements.txt --without-hashes - poetry export -o constraints.txt --dev --without-hashes - - name: Create test conda environment - shell: bash -l {0} - run: | - conda create -n test -y python=${{ matrix.python-version }} - - name: Install lint dependencies + - name: Install conda environment + uses: mamba-org/setup-micromamba@v1 + with: + environment-name: test + create-args: >- + python=${{ matrix.python-version }} + gdal=3.2.0 + - name: Install dependencies shell: bash -l {0} run: | conda activate test - pip install --constraint=constraints.txt flake8 flake8-annotations flake8-black flake8-docstrings flake8-isort + poetry install --no-interaction --all-extras - name: Lint shell: bash -l {0} run: | conda activate test flake8 src tests - - name: Install test dependencies - shell: bash -l {0} - run: | - conda activate test - conda install -y gdal=3.2.0 - pip install --constraint=constraints.txt -r requirements.txt - pip install --constraint=constraints.txt pytest - - name: Install coverage dependencies - if: env.coverage == 'true' - shell: bash -l {0} - run: | - conda activate test - pip install --constraint=constraints.txt pytest-cov coverage[toml] codecov - name: Test if: env.coverage == 'false' shell: bash -l {0}