Skip to content

Commit

Permalink
ci: add a Python dev workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Jun 29, 2021
1 parent c3054df commit 7114da2
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 4 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/bleeding-edge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI (bleeding edge)
# this workflow is heavily inspired from pandas, see
# https://github.com/pandas-dev/pandas/blob/master/.github/workflows/python-dev.yml

# goals: check stability against
# - dev version of Python, numpy, and matplotlib
# - building with future pip default options

on:
push:
branches:
- main
schedule:
# run this every day at 3 am UTC
- cron: '0 3 * * *'

jobs:
build:
runs-on: ubuntu-latest
name: actions-310-dev
timeout-minutes: 60

concurrency:
group: ${{ github.ref }}-dev
cancel-in-progress: true

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python Dev Version
uses: actions/setup-python@v2
with:
python-version: '3.10-dev'

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install git+https://github.com/numpy/numpy.git
python -m pip install git+https://github.com/matplotlib/matplotlib.git
python -m pip install cython
- name: Build yt
# --no-build-isolation is used to guarantee that build time dependencies
# are not installed by pip as specified from pyproject.toml, hence we get
# to use the dev version of numpy at build time.
run: |
python setup.py build_ext -q -j2
python -m pip install -e .[test] --no-build-isolation
- name: Run Tests
run: pytest -vvv
9 changes: 8 additions & 1 deletion .github/workflows/build-test-pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Build and Test

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
paths-ignore:
- "doc/**"
- README.md

defaults:
run:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Build and Test

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
paths-ignore:
- "doc/**"
- README.md

defaults:
run:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<!--- Tests and style --->
![Build and Test](https://github.com/yt-project/yt/workflows/Build%20and%20Test/badge.svg?branch=main)
[![CI (bleeding edge)](https://github.com/yt-project/yt/actions/workflows/bleeding-edge.yaml/badge.svg)](https://github.com/yt-project/yt/actions/workflows/bleeding-edge.yaml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yt-project/yt/main.svg)](https://results.pre-commit.ci/latest/github/yt-project/yt/main)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ project_urls =
packages = find:
install_requires =
iPython>=1.0
matplotlib!=3.4.2,>=2.0.2,<3.5
matplotlib!=3.4.2,>=2.0.2,<3.6.0
more-itertools>=8.4
numpy>=1.13.3
pyyaml>=4.2b1
Expand Down
2 changes: 1 addition & 1 deletion tests/windows_conda_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ numpy>=1.19.4
cython>=0.29.21
cartopy~=0.18.0
h5py~=3.1.0
matplotlib<3.5
matplotlib>=2.0.2,<3.6.0
scipy~=1.5.0

0 comments on commit 7114da2

Please sign in to comment.