Skip to content

[pre-commit.ci] pre-commit autoupdate (#319) #180

[pre-commit.ci] pre-commit autoupdate (#319)

[pre-commit.ci] pre-commit autoupdate (#319) #180

Workflow file for this run

---
# This action initially adopted from The Turing Way from in October 2020.
# doi:10.5281/zenodo.3233853
# https://github.com/alan-turing-institute/the-turing-way/blob/af98c94/.github/workflows/no-bad-latin.yml
#
# This action triggers the script tools/no-bad-latin.py to and will throw an error if any latin expression (like e.g. or i.e.) is detected:
#
# This action will be triggered
# - on a push to master
# - on a PR to the master branch and will only check files that were modified in src
name: Check for Latin Phrases
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Decide when to run the tests
#
# This configuration sets the test to run on pushes to master
# and on pull requests that are opened to master
on:
push:
branches:
- main
pull_request:
branches: ['*']
# Set up the Continuous Integration job
jobs:
latin-phrases:
# 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
with:
submodules: recursive
fetch-depth: 0
# Set up the Python version. Relies on another GH-Action.
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
# Install Python dependencies
- name: Install dependencies
working-directory: ./tools
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 - Master
working-directory: ./tools
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
python no-bad-latin.py
- name: Run Python script to check for latin phrases - Pull Request
working-directory: ./tools
if: github.event.pull_request
run: |
python no-bad-latin.py --pull-request ${{ github.event.pull_request.number }}