Implemented the new pandas exercise up to the sorting task (Notebook … #270
Workflow file for this run
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
on: [push] | |
jobs: | |
pre_commit_validation: | |
name: Validate that pre-commit hooks have run | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
- name: Run hooks again to validate they have run | |
uses: xu-cheng/texlive-action/full@v1 | |
with: | |
run: | | |
apk update | |
apk upgrade | |
apk add --virtual build-dependencies build-base gcc wget git | |
apk add --no-cache python3 python3-dev py3-pip nodejs npm | |
pip3 install pre-commit | |
git config --global --add safe.directory /github/workspace | |
pre-commit run --verbose --all-files > pre-commit-validation.txt & cat pre-commit-validation.txt | |
if cat pre-commit-validation.txt | grep -q Failed; | |
then | |
echo "Pre-commit run did not run on local machine." | |
exit 1 | |
else | |
echo "Pre-commit did run on local machine." | |
fi | |
build_latex: | |
name: Build lecture PDFs | |
runs-on: ubuntu-latest | |
needs: [pre_commit_validation] | |
if: contains(needs.*.result, 'success') | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
- name: Build figures | |
uses: ./lecture/ | |
env: | |
WORKSPACE: ${{ github.workspace }} | |
with: | |
run: | | |
cd $WORKSPACE/lecture | |
make figures | |
- name: Compile LaTeX document | |
uses: xu-cheng/texlive-action/full@v1 | |
with: | |
run: | | |
apk add make | |
apk add git | |
git config --global --add safe.directory /github/workspace | |
cd lecture | |
ls -la img | |
make all-wo-figures | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: Lecture Slides | |
path: | | |
lecture/output/*.pdf | |
lecture/output/*.log | |
retention-days: 5 | |
build_exercise: | |
name: Build the exercise archives | |
runs-on: ubuntu-latest | |
needs: [pre_commit_validation] | |
if: contains(needs.*.result, 'success') | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
- name: Initialize Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r exercise-old/requirements.txt | |
- name: Build archives | |
run: | | |
cd exercise-old | |
make all | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: Exercise Archives | |
path: | | |
exercise-old/output/*.zip | |
retention-days: 5 |