Container CI, triggered by push #1
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: Containerized CI | |
run-name: Container CI, triggered by ${{ github.event_name }} | |
on: [push, pull_request] | |
jobs: | |
plot: | |
name: Plot | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run pylint | |
run: | | |
pylint --disable=import-outside-toplevel mandelbrot.py | |
- name: Generate the mandelbrot set | |
run: | | |
python mandelbrot.py | |
- name: Output as Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mandelbrot | |
path: mandelbrot.pdf | |
retention-days: 1 | |
if-no-files-found: error | |
texlive: | |
runs-on: ubuntu-latest | |
needs: plot | |
container: | |
image: texlive/texlive:latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Download artifact from run-matplotlib | |
uses: actions/download-artifact@v4 | |
with: | |
name: mandelbrot | |
path: | |
- name: Compile LaTeX document | |
run: | | |
latexmk -pdf main.tex | |
- name: Save matplotlib plot as atifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pdf | |
path: main.pdf | |
retention-days: 1 | |
if-no-files-found: error |