Skip to content

๏ธ2023 PyConIT ๐Ÿ‡ฎ๐Ÿ‡น (ed2ba8476ce7d6917264465ffa142641f1a7a211) #49

๏ธ2023 PyConIT ๐Ÿ‡ฎ๐Ÿ‡น (ed2ba8476ce7d6917264465ffa142641f1a7a211)

๏ธ2023 PyConIT ๐Ÿ‡ฎ๐Ÿ‡น (ed2ba8476ce7d6917264465ffa142641f1a7a211) #49

name: "2023 PyConIT ๐Ÿ‡ฎ๐Ÿ‡น generate gallery.pdf"
run-name: "๏ธ2023 PyConIT ๐Ÿ‡ฎ๐Ÿ‡น (${{ 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@v3
with:
fetch-depth: 1
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run:
pip install -r 2023_PyConIT/requirements.txt
- name: Run Black
run:
black 2023_PyConIT --check
- name: Run Flake8
run:
flake8 --config 2023_PyConIT/.flake8 2023_PyConIT
test:
name: ๐Ÿ•ต Test Python code
runs-on: ubuntu-latest
steps:
- name: Setup Python environment
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run:
pip install -r 2023_PyConIT/requirements.txt
- name: Run tests
run:
pytest 2023_PyConIT
PyConIT-Generate-pdf:
runs-on: ubuntu-latest
needs: [ lint, test ]
steps:
- name: Setup Python environment
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run:
pip install -r 2023_PyConIT/requirements.txt
- name: Generate PDF
run:
python 2023_PyConIT/src/assemble_plots.py
- name: Archive PDF
uses: actions/upload-artifact@v3
with:
name: gallery.pdf
path: 2023_PyConIT/results/gallery.pdf