Merge pull request #365 from InjectiveLabs/feat/upgrade_protobuf_version #333
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: | |
push: | |
branches: [master, dev] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '>=3.9 <3.12' | |
- name: Install poetry | |
run: python -m pip install poetry | |
- name: Cache the virtualenv | |
id: cache-venv | |
uses: actions/cache@v4 | |
with: | |
path: ./.venv | |
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: python -m poetry install | |
- name: Run pre-commit | |
run: | | |
python -m poetry run pre-commit run --show-diff-on-failure --color=always --all-files | |
shell: bash |