Remove requirements-dev.txt #1238
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
# Concurrency group that uses the workflow name and PR number if available | |
# or commit SHA as a fallback. If a new build is triggered under that | |
# concurrency group while a previous build is running it will be canceled. | |
# Repeated pushes to a PR will cancel all previous builds, while multiple | |
# merges to main will not cancel. | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
env: | |
MICROMAMBA_VERSION: 'latest' | |
jobs: | |
test-windows: | |
env: | |
PYTHONUNBUFFERED: "1" | |
FORCE_COLOR: "1" | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
micromamba-version: ${{ env.MICROMAMBA_VERSION }} | |
environment-file: environments/dev-environment.yaml | |
init-shell: powershell | |
create-args: >- | |
python=3.11 | |
- name: install conda-lock | |
run: | | |
pip install -e . --force-reinstall | |
- name: run-test | |
run: | | |
copy pyproject.toml "%RUNNER_TEMP%" | |
Xcopy /E /I tests "%RUNNER_TEMP%\\tests" | |
pushd "${RUNNER_TEMP}" | |
set TMPDIR="%RUNNER_TEMP%" | |
dir | |
pytest --cov=conda_lock --cov-branch --cov-report=xml --cov-report=term tests | |
copy coverage.xml %GITHUB_WORKSPACE% | |
- uses: codecov/codecov-action@v3 | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest ] | |
python-version: [ "3.8", "3.11" ] | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
PYTHONUNBUFFERED: "1" | |
FORCE_COLOR: "1" | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- uses: mamba-org/setup-micromamba@v1 | |
with: | |
micromamba-version: ${{ env.MICROMAMBA_VERSION }} | |
environment-file: environments/dev-environment.yaml | |
init-shell: bash | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: install conda-lock | |
shell: bash -eo pipefail -l {0} | |
run: | | |
which pip | |
pip install -e . --force-reinstall | |
- name: run-test | |
shell: bash -eo pipefail -l {0} | |
run: | | |
cp pyproject.toml "${RUNNER_TEMP}/" | |
cp -a tests "${RUNNER_TEMP}/" | |
pushd "${RUNNER_TEMP}" | |
export TMPDIR="${RUNNER_TEMP}" | |
ls -lah | |
set -x | |
which pytest | |
pytest --cov=conda_lock --cov-branch --cov-report=xml --cov-report=term tests | |
cp coverage.xml "${GITHUB_WORKSPACE}" | |
- uses: codecov/codecov-action@v3 | |
- name: test-gdal | |
shell: bash -eo pipefail -l {0} | |
run: | | |
pushd "${RUNNER_TEMP}/tests/gdal" | |
export TMPDIR="${RUNNER_TEMP}" | |
ls -lah | |
conda-lock --mamba -f environment.yml -p linux-64 |