Merge pull request #185 from nhs-r-community/add-spellchecker #22
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
# Acknowledgements: | |
# Copyright © The Turing Way Community and, where practical | |
# https://github.com/the-turing-way/the-turing-way) | |
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 | |
pull_request: | |
branches: | |
- main | |
# 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@v4 | |
# Set up the Python version. Relies on another GH-Action. | |
- name: Setup Python 3.13 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
# 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 }} |