forked from open-atmos/PyMPDATA
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.06 KB
/
readme_python.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: readme_python
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/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.9
- run: pip install -e .
- run: pip install pytest-codeblocks pytest matplotlib
- run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('docs/markdown/pympdata_landing.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: cat readme.py
- run: ls readme_grid.png
- run: ls readme_gauss_0.png
- run: ls readme_gauss.png
- name: artefacts
if: github.ref == 'refs/heads/main'
uses: eine/tip@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
readme_grid.png
readme_gauss_0.png
readme_gauss.png