Skip to content

Fix bug with last numpy and integer management #15

Fix bug with last numpy and integer management

Fix bug with last numpy and integer management #15

Workflow file for this run

name: CI tests
# CI tests ran every time new code is pushed to the repo
on:
push:
branches:
- master
pull_request:
branches-ignore:
- 'dependabot*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-ci-trigger:
name: detect ci trigger
runs-on: ubuntu-latest
if: |
github.repository == 'obidam/pyxpcm'
&& (github.event_name == 'push' || github.event_name == 'pull_request')
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: xarray-contrib/[email protected]
id: detect-trigger
with:
keyword: "[skip-ci]"
scikit:
# CI tests for environments with requirements in pinned versions, using Scikit-learn backend
# All commits must pass this
name: Scikit-Learn - Pinned - Py${{matrix.python-version}} - ${{ matrix.os }}
needs: detect-ci-trigger
runs-on: ${{ matrix.os }}
if: needs.detect-ci-trigger.outputs.triggered == 'false'
defaults:
run:
shell: bash -l {0}
continue-on-error: ${{ matrix.experimental }}
strategy:
max-parallel: 12
fail-fast: false
matrix:
python-version: ["3.8"]
os: ["ubuntu-latest", "macos-latest"]
experimental: [false]
steps:
- uses: actions/checkout@v4
- name: Set environment variables
run: |
echo "CONDA_ENV_FILE=ci/requirements/py${{matrix.python-version}}-all-pinned-scikitlearn.yml" >> $GITHUB_ENV
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: ${{ env.CONDA_ENV_FILE }}
environment-name: pyxpcm-tests
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
extra-specs: |
python=${{matrix.python-version}}
conda
# We only want to install this on one run, because otherwise we'll have
# duplicate annotations.
- name: Install error reporter
if: ${{ matrix.os }} == 'ubuntu-latest' and ${{ matrix.python-version }} == '3.8'
run: |
python -m pip install pytest-github-actions-annotate-failures
- name: Version info
run: |
conda info
conda list
# - name: Lint with flake8
# run: |
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -ra -v -s --durations=10 --cov=./ --cov-config=.coveragerc --cov-report xml:cov.xml --cov-report term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./cov.xml
flags: unittests
name: codecov-github
fail_ci_if_error: false
env_vars: RUNNER_OS,PYTHON_VERSION
daskml:
# CI tests for environments with requirements in pinned versions, using Dask-ML backend
# All commits must pass this
name: Dask-ML - Pinned - Py${{matrix.python-version}} - ${{ matrix.os }}
needs: detect-ci-trigger
runs-on: ${{ matrix.os }}
if: needs.detect-ci-trigger.outputs.triggered == 'false'
defaults:
run:
shell: bash -l {0}
continue-on-error: ${{ matrix.experimental }}
strategy:
max-parallel: 12
fail-fast: false
matrix:
python-version: ["3.8"]
os: ["ubuntu-latest", "macos-latest"]
experimental: [true]
steps:
- uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "CONDA_ENV_FILE=ci/requirements/py${{matrix.python-version}}-all-pinned-daskml.yml" >> $GITHUB_ENV
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: ${{ env.CONDA_ENV_FILE }}
environment-name: pyxpcm-tests
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
extra-specs: |
python=${{matrix.python-version}}
conda
- name: Version info
run: |
conda info
conda list
# - name: Lint with flake8
# run: |
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -ra -v -s --durations=10 --cov=./ --cov-config=.coveragerc --cov-report xml:cov.xml --cov-report term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./cov.xml
flags: unittests
name: codecov-github
fail_ci_if_error: false
env_vars: RUNNER_OS,PYTHON_VERSION