Skip to content

15 / 031 : start numba version #1151

15 / 031 : start numba version

15 / 031 : start numba version #1151

name: CI
on:
schedule:
- cron: '45 01 30 * *'
push:
fork:
jobs:
test_utils:
name: Check utils
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: checkout
id: checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
cache-suffix: "uv"
cache-dependency-glob: "utils/requirements.txt"
- name: Create venv
run: uv venv my_env
- name: setup environment
id: setup
run: |
source my_env/bin/activate
uv pip install -r ./utils/requirements.txt
- name: list packages
id: list_pakcages
run: |
source my_env/bin/activate
uv pip list
- name: check utils
id: check_utils
run: |
source my_env/bin/activate
python -m pytest -n auto ./utils/tests/
badges:
name: Add Google Colab Badges
needs: test_utils
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 5
steps:
- name: checkout
id: checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
cache-suffix: "uv"
cache-dependency-glob: "utils/requirements.txt"
- name: Create venv
run: uv venv my_env
- name: setup environment
id: setup
run: |
source my_env/bin/activate
uv pip install -r ./utils/requirements.txt
- name: list packages
id: list_pakcages
run: |
source my_env/bin/activate
uv pip list
- name: Add/Update badges
id: badges
run: |
source my_env/bin/activate
python ./utils/add_colab_main_buttons.py
- name: Commit & push
id: commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message : "Clean ipynb ${{ github.sha }}"
test_ipynb:
needs: badges
name: ${{ matrix.anaconda }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
anaconda: ["2023.09", "nightly"]
fail-fast: false
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: setup conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: test-environment
environment-file: ./tests/environment.${{ matrix.anaconda }}.yml
use-only-tar-bz2: true
- name: pytest
env:
TEST_IPYNB_IGNORE_FOLDER: tutorial
run: |
conda env list
conda activate test-environment
conda list
python -m pytest --numprocesses=auto -k 'not (links or update_nmisp_py)' ./tests/
shell: bash -el {0}
test_ipynb_colab:
needs: badges
name: test ipynb on Google Colab
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.10.12'
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
cache-suffix: "uv"
cache-dependency-glob: "tests/requirements.colab.2024.12.txt"
- name: Create venv
run: uv venv my_env
- name: setup environment
id: setup
run: |
source my_env/bin/activate
uv pip install -r ./tests/requirements.colab.2024.12.txt
- name: list packages
id: list_pakcages
run: |
source my_env/bin/activate
uv pip list
- name: pytest
env:
TEST_IPYNB_IGNORE_FOLDER: tutorial
run: |
source my_env/bin/activate
python -m pytest -n auto -k 'not (links or update_nmisp_py)' ./tests
update_nmisp_py:
needs: [test_ipynb, test_ipynb_colab]
name: Update nmisp_py
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: checkout
id: checkout
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.10.12'
cache: 'pip'
- name: run nmisp_py updater
id: updater
env:
LOGIN_INFO: ${{ secrets.LOGIN_INFO }}
run: python ./utils/update_nmisp_py.py