Change teacher listing format #1540
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
name: Lint | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
types: [ opened, reopened, synchronize ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Fetch head and base refs | |
# This is necessary for pre-commit to check the changes in the PR branch | |
run: | | |
git fetch origin ${{ github.base_ref }}:base_ref | |
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr_ref | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ hashFiles('requirements*') }} | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip wheel | |
python3 -m pip install --upgrade --upgrade-strategy eager pre-commit | |
sudo apt-get install -y git | |
- name: Run pre-commit | |
run: | | |
pre-commit run --from-ref base_ref --to-ref pr_ref --show-diff-on-failure |