Add ref for signing service template (#2839) #552
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: python_lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- '.github/workflows/python_lint.yml' | |
- 'python/**' | |
concurrency: | |
group: python_lint-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
PYTHON_VERSION: '3.9' | |
REQUIREMENTS_PATH: "python/test-requirements.txt" | |
jobs: | |
python_lint: | |
name: python_lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v3 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Caching dependency | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
key: v1-python-${{ env.PYTHON_VERSION }}-${{ hashFiles(env.REQUIREMENTS_PATH) }} | |
- name: Install requirements | |
run: | | |
pip install -q -e python | |
pip install -r "${{ env.REQUIREMENTS_PATH }}" | |
- name: Run lint | |
run: | | |
(make lint-python && git diff --exit-code python ) || \ | |
(echo "Pylint/black issue(s) found in python directory. Run \`make lint-python\` in the dev image, resolve the issues, and commit the changes." && exit 1) |