CI #67
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", "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@v3 | |
with: | |
token: ${{ github.token }} | |
- name: conda_setup | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: uxarray_build | |
channel-priority: strict | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
environment-file: ci/environment.yml | |
- 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 |