CI #95
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: CI | |
on: | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' # Daily “At 00:00” | |
jobs: | |
test: | |
# if: | | |
# github.repository == 'UXARRAY/uxarray' | |
name: Python (${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ "ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] | |
python-version: [ "3.9", "3.10", "3.11"] | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ github.token }} | |
- name: conda_setup (x64) | |
uses: conda-incubator/setup-miniconda@v3 | |
if: matrix.os != 'macos-14' | |
with: | |
activate-environment: uxarray_build | |
channel-priority: strict | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
environment-file: ci/environment.yml | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
- name: conda_setup (ARM64) | |
uses: conda-incubator/setup-miniconda@v3 | |
if: matrix.os == 'macos-14' | |
with: | |
activate-environment: uxarray_build | |
channel-priority: strict | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
environment-file: ci/environment.yml | |
installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Mambaforge-23.11.0-0-MacOSX-arm64.sh | |
- name: Install uxarray | |
run: | | |
python -m pip install . --no-deps | |
- name: conda list | |
run: | | |
conda list | |
- name: Run Namespace Tests | |
run: | | |
python -m pytest test | |
- name: Run Coverage Tests | |
run: | | |
python -m pytest test -v --cov=./uxarray --cov-report=xml | |
- name: Upload code coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
fail_ci_if_error: false |