Skip to content

Add submit_videomae_generate_full_sent.py #6

Add submit_videomae_generate_full_sent.py

Add submit_videomae_generate_full_sent.py #6

# This workflow finds which files were changed, prints them,
# and runs `pre-commit` on those files.
# Inspired by the sktime library:
# https://github.com/alan-turing-institute/sktime/blob/main/.github/workflows/test.yml
name: Code Quality PR
on:
pull_request:
branches: [main]
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies and eilev
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --with dev
- name: Find modified files
id: file_changes
uses: trilom/[email protected]
with:
output: " "
- name: List modified files
run: echo '${{ steps.file_changes.outputs.files}}'
- name: Load cached pre-commit venv
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commits
run: poetry run pre-commit run --show-diff-on-failure --color=always --files ${{ steps.file_changes.outputs.files}}