add background_review.md file #130
Workflow file for this run
This file contains hidden or 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: ET CI Checks | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
ls_linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ls-lint/action@v2.2.3 | |
md_formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: nosborn/github-action-markdown-cli@v3.3.0 | |
with: | |
files: . | |
config_file: .markdownlint.yml | |
py_formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Python - Check Formatting | |
uses: astral-sh/ruff-action@v1 | |
with: | |
args: "format --check" | |
py_linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# passing ruff linting is required | |
- name: Python - Check Linting - ruff | |
uses: astral-sh/ruff-action@v1 | |
# passing pylint is not required - discuss errors in code review | |
# adapted from https://github.com/davidslusser/actions_python_pylint/tree/main | |
- name: python version | |
run: python --version | |
shell: bash | |
if: always() | |
- name: install pylint | |
run: | | |
python - m pip install --upgrade pip | |
pip install pylint | |
shell: bash | |
- name: Python - Check Linting - pylint | |
run: "pylint **/*.py --ignore-paths=env,venv,.env,.venv,__pycache__,.git || echo '::warning title=Pylint Error(s)::Discuss solutions and trade-offs in code review.'" | |
shell: bash | |
py_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: python version | |
run: python --version | |
shell: bash | |
- name: Check for test files | |
id: check_tests | |
run: | | |
test_files=$(find . -type f -name "**/test_*.py") | |
if [ -n "$test_files" ]; then | |
echo "Found test files:" | |
echo "$test_files" | |
echo "has_tests=true" >> $GITHUB_OUTPUT | |
else | |
echo "No test files found matching pattern **/test_*.py" | |
echo "has_tests=false" >> $GITHUB_OUTPUT | |
fi | |
shell: bash | |
- name: Python - Run Tests | |
if: steps.check_tests.outputs.has_tests == 'true' | |
run: python -m unittest | |
shell: bash | |
py_notebook_linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: python version | |
run: python --version | |
shell: bash | |
if: always() | |
- name: install nbqa | |
run: | | |
python - m pip install --upgrade pip | |
pip install pylint | |
pip install nbqa | |
shell: bash | |
- name: Python Notebooks - Check Linting - nbqa | |
run: "nbqa pylint *.ipynb || echo '::warning title=NoteBook QA Error(s)::Discuss solutions and trade-offs in code review.'" | |
shell: bash |