split unit tests, parcel smoke tests and multi-process/condensation e… #1299
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: readme_snippets | |
defaults: | |
run: | |
shell: bash | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '0 13 * * 4' | |
jobs: | |
python: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
python-version: 3.9 | |
- run: pip install -e .[tests] | |
- run: pip install pytest-codeblocks pytest | |
- run: pip install "pyparsing<3.0.0" # https://github.com/matplotlib/matplotlib/issues/25204 | |
- run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('README.md'); f=open('readme.py', 'w'); f.writelines(block.code for block in code if block.syntax=='Python'); f.close()" | |
- run: python -We readme.py | |
- run: sed -i 's/CPU/GPU/g' readme.py | |
- run: python -We readme.py | |
- name: artefacts | |
if: github.ref == 'refs/heads/main' | |
uses: eine/tip@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
readme.png | |
julia: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
python-version: 3.9 | |
- run: pip install -e . | |
- run: pip install pytest-codeblocks pytest | |
- run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('README.md'); f=open('readme.jl', 'w'); f.writelines(block.code for block in code if block.syntax=='Julia'); f.close()" | |
- uses: julia-actions/[email protected] | |
- run: cat -n readme.jl | |
- run: julia readme.jl | |
- run: sed -i 's/CPU/GPU/g' readme.jl | |
- run: julia readme.jl | |
matlab: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
python-version: 3.8 | |
- run: pip install -e . | |
- run: pip install pytest-codeblocks pytest | |
- run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('README.md'); f=open('readme.m', 'w'); f.writelines(block.code for block in code if block.syntax=='Matlab'); f.close()" | |
- run: cat -n readme.m | |
- uses: matlab-actions/[email protected] | |
with: | |
release: R2021a | |
- uses: matlab-actions/[email protected] | |
with: | |
command: readme | |
- run: sed -i 's/CPU/GPU/g' readme.m | |
- uses: matlab-actions/[email protected] | |
with: | |
command: readme | |
- name: artefacts | |
if: github.ref == 'refs/heads/main' | |
uses: eine/tip@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
parcel.png | |