Skip to content

CI move ci to GitHub action #30

CI move ci to GitHub action

CI move ci to GitHub action #30

Workflow file for this run

name: CI
# Define scheduling for the workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# Daily build at 9:00 AM
- cron: "0 9 * * *"
# Cancel in-progress workflows when pushing
# a new commit on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: pip install flake8
- name: Flake8 linter
run: flake8 .
testing:
name: Testing
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
include:
- os: ubuntu-latest
python-version: "pypy3.8"
pypy-version: 7.3.11
- os: ubuntu-latest
python-version: "pypy3.8"
pypy-version: 7.3.6
- os: ubuntu-latest
python-version: "pypy3.10"
pypy-version: 7.3.13
- os: ubuntu-latest
python-version: "3.10"
extra-conda-packages: numpy=1.23 distributed=2023.10.1
- os: ubuntu-latest
python-version: "3.8"
extra-conda-packages: numpy=1.18.5 distributed=2021.5.0
- os: ubuntu-latest
python-version: "3.11"
extra-conda-packages: numpy=1.24.1
cython: true
- os: ubuntu-latest
python-version: "3.8"
extra-conda-packages: numpy=1.16
joblib-multiprocessing: 0
no-lzma: 1
- os: ubuntu-latest
python-version: "3.8"
no-numpy: true
- os: ubuntu-latest
python-version: "3.8"
default-backend-threading: true
- os: 'ubuntu-latest'
python-version: "free-threaded-3.13"
env:
JUNIT_XML: 'test-data.xml'
COVERAGE: 'true'
PYTHON_VERSION: ${{ matrix.python-version }}
PYPY_VERSION: ${{ matrix.pypy-version }}
CYTHON: ${{ matrix.cython }}
EXTRA_CONDA_PACKAGES: ${{ matrix.extra-conda-packages }}
runs-on: ${{ matrix.os }}
defaults:
run:
# Need to use this shell to get cond working properly.
# See https://github.com/marketplace/actions/setup-miniconda#important
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
auto-update-conda: true
miniforge-version: latest
- name: Install dependencies
run: |
bash -el continuous_integration/install.sh
- name: Run tests
run: |
bash -el continuous_integration/run_tests.sh
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
with:
report_paths: ${{ env.JUNIT_XML }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
file: .coverage