Skip to content
Snippets Groups Projects
Unverified Commit a72e43ae authored by mmcky's avatar mmcky Committed by GitHub
Browse files

MAINT: Adjust Continuous Integration (Linux) with Scheduled (OS X and Windows) (#1697)


* remove editable mode for pip install with pyproject.toml, migrate numba fix

* Update .github/workflows/scheduled_tests.yml

Co-authored-by: default avatarChris Holdgraf <choldgraf@berkeley.edu>

* Update .github/workflows/scheduled_tests.yml

Co-authored-by: default avatarChris Holdgraf <choldgraf@berkeley.edu>

* Update .github/workflows/scheduled_tests.yml

Co-authored-by: default avatarChris Holdgraf <choldgraf@berkeley.edu>

* remove linux testing from scheduled tests as they are managed by tests.yml

* FIX: broken references in myst-nb

* Simplify scheduled CRON tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci



* Update .github/workflows/scheduled_tests.yml

Co-authored-by: default avatarChris Holdgraf <choldgraf@berkeley.edu>

Co-authored-by: default avatarChris Holdgraf <choldgraf@berkeley.edu>
Co-authored-by: default avatarChris Holdgraf <choldgraf@gmail.com>
Co-authored-by: default avatarpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent 5aeb6e47
No related branches found
No related tags found
No related merge requests found
name: scheduled-tests
on:
schedule:
# Run at the beginning of each day
- cron: '0 0 * * *'
jobs:
tests-windows:
name: Run tests and build docs on Windows
runs-on: windows-latest
strategy:
matrix:
# Using the default python in the Windows 2022 github actions runner
# ref: https://github.com/actions/virtual-environments/issues/4856
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing,sphinx]
- name: Run pytest
run: pytest --durations=10 -m 'not requires_chrome and not requires_tex' --jb-tempdir local_path
- name: Build the book
run: |
jb build -W -n --keep-going --builder html docs/
osx:
name: Run Tests on OS X
runs-on: macos-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
# Install libmagic to avoid a flaky Fonts error with matplotlib
# ref: https://stackoverflow.com/questions/62279920/python-macos-error-unable-to-revert-mtime-library-fonts
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing,sphinx]
brew install libmagic
- name: Run Pytest
run: |
pytest --durations=10 -m 'not requires_chrome and not requires_tex' --jb-tempdir local_path
- name: Build the book
run: |
jb build -W -n --keep-going --builder html docs/
...@@ -6,8 +6,6 @@ on: ...@@ -6,8 +6,6 @@ on:
tags: tags:
- 'v*' - 'v*'
pull_request: pull_request:
schedule:
- cron: '0 0 * * *'
env: env:
# Force colors for logs # Force colors for logs
...@@ -112,75 +110,10 @@ jobs: ...@@ -112,75 +110,10 @@ jobs:
- name: Run pytest - name: Run pytest
run: pytest --durations=10 -m 'not requires_tex' run: pytest --durations=10 -m 'not requires_tex'
windows:
name: Tests on Windows
runs-on: windows-latest
strategy:
matrix:
# Using the default python in the Windows 2022 github actions runner
# ref: https://github.com/actions/virtual-environments/issues/4856
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing]
- name: Run pytest
run: pytest --durations=10 -m 'not requires_chrome and not requires_tex' --jb-tempdir local_path
# Build the book on OSX to make sure that building the docs works there too
build-book-osx:
name: Build docs on OSX
runs-on: macos-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
# We install libmagic to avoid a flaky Fonts error with matplotlib
# ref: https://stackoverflow.com/questions/62279920/python-macos-error-unable-to-revert-mtime-library-fonts
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[sphinx]
brew install libmagic
- name: Build the book
run: |
jb build -W -n --keep-going --builder html docs/
publish: publish:
name: Publish to PyPi name: Publish to PyPi
needs: [pre-commit, tests, test-with-cov, build-book-osx] needs: [pre-commit, test-with-cov, tests]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
......
(content:myst)=
# MyST Markdown overview # MyST Markdown overview
In addition to [Jupyter Notebook Markdown](../file-types/notebooks.ipynb), In addition to [Jupyter Notebook Markdown](../file-types/notebooks.ipynb),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment