Skip to content

Code style additions #8338

Code style additions

Code style additions #8338

Workflow file for this run

# Give your test a name!
name: Check for Latin Phrases
# Decide when to run the tests
#
# This configuration sets the test to run on pushes to main
# and on pull requests that are opened to main
on:
push:
branches:
- main
paths:
- "book/**"
pull_request:
branches:
- main
paths:
- "book/**"
# Set up the Continuous Integration job
jobs:
latin-phrases:
if: (github.event.pull_request) && !contains(github.head_ref, 'all-contributors')
# Run on the latest Ubuntu distribution
runs-on: ubuntu-latest
# This section collects together the steps involved in running the test
steps:
# Checkout the repository. Relies on another GH-Action.
- uses: actions/checkout@v3
# Set up the Python version. Relies on another GH-Action.
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.8"
# Install Python dependencies
- name: Install dependencies
working-directory: ./tests
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
# Run a Python script
- name: Run Python script to check for latin phrases - Main branch
working-directory: ./tests
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
python no-bad-latin.py
- name: Run Python script to check for latin phrases - Pull Request
working-directory: ./tests
if: github.event.pull_request
run: |
python no-bad-latin.py --pull-request ${{ github.event.pull_request.number }}