From 0a983c06edeb440d95431bf7c501ec5f690e1534 Mon Sep 17 00:00:00 2001 From: TomNicholas Date: Fri, 15 Mar 2024 01:05:35 -0400 Subject: [PATCH 1/3] test env --- virtualizarr/ci/environment.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 virtualizarr/ci/environment.yml diff --git a/virtualizarr/ci/environment.yml b/virtualizarr/ci/environment.yml new file mode 100644 index 00000000..313e76b4 --- /dev/null +++ b/virtualizarr/ci/environment.yml @@ -0,0 +1,18 @@ +name: virtualizarr-test +channels: + - conda-forge + - nodefaults +dependencies: + - python>=3.9 + - netcdf4 + - pytest + - flake8 + - black + - codecov + - pytest-cov + - h5netcdf + - kerchunk + - ujson + - pydantic + - pip: + - xarray>=2024.02.0.dev0 \ No newline at end of file From 5f1bb5db256fffdaa490515a65d89673c319d84a Mon Sep 17 00:00:00 2001 From: TomNicholas Date: Fri, 15 Mar 2024 01:05:46 -0400 Subject: [PATCH 2/3] test workflow config file --- virtualizarr/.github/workflows/main.yml | 57 +++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 virtualizarr/.github/workflows/main.yml diff --git a/virtualizarr/.github/workflows/main.yml b/virtualizarr/.github/workflows/main.yml new file mode 100644 index 00000000..44eeb4fd --- /dev/null +++ b/virtualizarr/.github/workflows/main.yml @@ -0,0 +1,57 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: "0 0 * * *" + +jobs: + + test: + name: ${{ matrix.python-version }}-build + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + + - name: Create conda environment + uses: mamba-org/provision-with-micromamba@main + with: + cache-downloads: true + micromamba-version: 'latest' + environment-file: ci/environment.yml + extra-specs: | + python=${{ matrix.python-version }} + + - name: Conda info + run: conda info + + - name: Install virtualizarr + run: | + python -m pip install -e . --no-deps --force-reinstall + + - name: Conda list + run: conda list + + - name: Running Tests + run: | + python -m pytest --cov=./ --cov-report=xml --verbose + + - name: Upload code coverage to Codecov + uses: codecov/codecov-action@v3.1.4 + with: + file: ./coverage.xml + flags: unittests + env_vars: OS,PYTHON + name: codecov-umbrella + fail_ci_if_error: false \ No newline at end of file From 66639eb8d5fadae9da79a926ddee12237e8daf64 Mon Sep 17 00:00:00 2001 From: TomNicholas Date: Fri, 15 Mar 2024 01:19:52 -0400 Subject: [PATCH 3/3] lint --- virtualizarr/.github/workflows/main.yml | 2 +- virtualizarr/ci/environment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/virtualizarr/.github/workflows/main.yml b/virtualizarr/.github/workflows/main.yml index 44eeb4fd..000e3285 100644 --- a/virtualizarr/.github/workflows/main.yml +++ b/virtualizarr/.github/workflows/main.yml @@ -54,4 +54,4 @@ jobs: flags: unittests env_vars: OS,PYTHON name: codecov-umbrella - fail_ci_if_error: false \ No newline at end of file + fail_ci_if_error: false diff --git a/virtualizarr/ci/environment.yml b/virtualizarr/ci/environment.yml index 313e76b4..82b00449 100644 --- a/virtualizarr/ci/environment.yml +++ b/virtualizarr/ci/environment.yml @@ -15,4 +15,4 @@ dependencies: - ujson - pydantic - pip: - - xarray>=2024.02.0.dev0 \ No newline at end of file + - xarray>=2024.02.0.dev0