WIP: Setup GitHub Action Continuous Integration tests #9
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: Tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.12"] | |
os: [ubuntu-24.04] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
# Checkout current git repository | |
- name: Checkout | |
uses: actions/checkout@v4.1.7 | |
# Install Micromamba with conda-forge dependencies | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@v1.9.0 | |
with: | |
environment-name: cupy-xarray | |
condarc: | | |
channels: | |
- conda-forge | |
- nodefaults | |
create-args: >- | |
cupy-core | |
dask | |
netcdf4 | |
pip | |
pooch | |
python=${{ matrix.python-version }} | |
pytest | |
xarray | |
# Install the package that we want to test | |
- name: Install the package | |
run: python -m pip install . | |
# Run the unit tests | |
- name: Test with pytest | |
run: | | |
pytest --verbose cupy_xarray/tests/ |