/
NuclearExistence
/
solid-state_kinetics
Обзор
Документация
Войти
/
NuclearExistence
/
solid-state_kinetics
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/pre-commit.yml
69 строк
2 KB
defqy
Update pre-commit.yml
10 июн 2024, 19:36
Не верифицирован
10 июн 2024, 19:36
0738e8f
Код
Авторство
О чём код?
# .github/workflows/pre-commit.yml # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions --- name: pre-commit on: workflow_dispatch: pull_request: push: # branches: ["master", "main"] paths-ignore: - '**.md' jobs: pre-commit: timeout-minutes: 5 runs-on: ubuntu-latest strategy: fail-fast: true matrix: python-version: [ "3.12" ] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Restore cached python id: python-cache uses: actions/cache/restore@v4 with: path: | ~/.cache/pypoetry ~/.local .venv key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} - uses: snok/install-poetry@v1 if: steps.python-cache.outputs.cache-hit != 'true' with: virtualenvs-create: true virtualenvs-in-project: true installer-parallel: true - name: Install dependencies if: steps.python-cache.outputs.cache-hit != 'true' run: | poetry install --no-interaction - name: Save Python cache if: steps.python-cache.outputs.cache-hit != 'true' id: python-cache-save uses: actions/cache/save@v4 with: path: | ~/.cache/pypoetry ~/.local .venv key: ${{ steps.python-cache.outputs.cache-primary-key }} - name: Run pre-commit run: | source .venv/bin/activate poetry run pre-commit run --all-files