οΈ2023 PyData Berlin π©πͺ (ed667c68a6669206ea54adca3fe675e35d648c5b) #72
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: "2023 PyData Berlin π©πͺ generate gallery.pdf" | |
run-name: "οΈ2023 PyData Berlin π©πͺ (${{ github.sha }})" | |
on: | |
# The "pull_request" section is currently commented out because the workflow can still be manually triggered | |
# pull_request: | |
# branches: | |
# - main | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
PYTHON_VERSION: 3.11.4 | |
defaults: | |
run: | |
shell: bash -el {0} | |
jobs: | |
lint: | |
name: π¨ Lint Python code | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Python environment | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | |
pip install -r 2023_PyData_Berlin/requirements.txt | |
- name: Run Black | |
run: | |
black 2023_PyData_Berlin --check | |
- name: Run Flake8 | |
run: | |
flake8 --config 2023_PyData_Berlin/.flake8 2023_PyData_Berlin | |
test: | |
name: π΅ Test Python code | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Python environment | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | |
pip install -r 2023_PyData_Berlin/requirements.txt | |
- name: Run tests | |
run: | |
pytest 2023_PyData_Berlin | |
generate-pdf: | |
runs-on: ubuntu-latest | |
needs: [ lint, test ] | |
steps: | |
- name: Setup Python environment | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | |
pip install -r 2023_PyData_Berlin/requirements.txt | |
- name: Generate PDF | |
run: | |
python 2023_PyData_Berlin/src/assemble_plots.py | |
- name: Archive PDF | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gallery.pdf | |
path: 2023_PyData_Berlin/results/gallery.pdf |