Update adf_variable_defaults.yaml #355
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: pre-commit | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
push: | |
# Run the tests one more time, after the PR changes | |
# have been pushed. The if-statement below prevents | |
# the push from running on other repos. | |
branches: | |
#Trigger workflow on push to any branch or branch heirarchy: | |
- '**' | |
jobs: | |
#This job is designed to run the "pre-commit" | |
#set of static analysis, linters, and formatters | |
#for Python and YAML. | |
pre-commit: | |
if: github.event_name == 'pull_request' || github.repository == 'NCAR/ADF' | |
runs-on: ubuntu-latest | |
steps: | |
# acquire github action routines | |
- uses: actions/checkout@v3 | |
# acquire specific version of python | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' # Use python 3.10 | |
# install pre-commit package | |
- name: Install pre-commit | |
run: | | |
python -m pip install --upgrade pip # Install latest version of PIP | |
pip install pre-commit | |
# run pre-commit on ADF code | |
- name: Run pre-commit | |
run: pre-commit run -a | |