[ECO-2386] Remove --verbose
flag from pre-commit, update config to mitigate flaky tests
#2946
Workflow file for this run
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
# cspell:word pydeps | |
# cspell:word pylint | |
# cspell:word snok | |
# cspell:word venv | |
# cspell:word virtualenvs | |
--- | |
env: | |
POETRY_VERSION: '1.8.2' | |
PYTHON_VERSION: '3.10' | |
TS_DIR: 'src/typescript' | |
jobs: | |
pre-commit: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: 'actions/checkout@v4' | |
- run: 'git submodule update --init --recursive src/rust/processor' | |
- uses: 'actions/setup-python@v3' | |
with: | |
python-version: '${{ env.PYTHON_VERSION }}' | |
- name: 'Install libdw-dev' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libdw-dev | |
- uses: 'actions/setup-node@v4' | |
with: | |
node-version-file: '${{ env.TS_DIR }}/.node-version' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: 'pnpm/action-setup@v4' | |
with: | |
package_json_file: '${{ env.TS_DIR }}/package.json' | |
- run: 'cd ${{ env.TS_DIR }} && pnpm i' | |
- name: 'Cache Poetry Install' | |
uses: 'actions/cache@v3' | |
with: | |
key: 'poetry-${{ env.POETRY_VERSION }}' | |
path: '${{ runner.home }}/.local/src/python/hooks' | |
- name: 'Install Poetry' | |
uses: 'snok/install-poetry@v1.3.4' | |
with: | |
installer-parallel: true | |
version: '${{ env.POETRY_VERSION }}' | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- id: 'restore-deps' | |
uses: 'actions/cache/restore@v3' | |
with: | |
key: | | |
pydeps-${{ hashFiles('./src/python/hooks/poetry.lock') }} | |
path: './src/python/hooks/.venv' | |
- if: | | |
steps.restore-deps.outputs.cache-hit != 'true' | |
name: 'Install Dependencies' | |
run: | | |
cd ./src/python/hooks | |
poetry install --no-interaction --no-root | |
- id: 'save-deps' | |
uses: 'actions/cache/save@v3' | |
with: | |
key: | | |
pydeps-${{ hashFiles('./src/python/hooks/poetry.lock') }} | |
path: './src/python/hooks/.venv' | |
- uses: 'pre-commit/action@v3.0.0' | |
with: | |
extra_args: '--all-files --config cfg/pre-commit-config.yaml' | |
name: 'pre-commit' | |
'on': | |
pull_request: null | |
push: | |
branches: | |
- 'main' | |
- 'production' | |
workflow_dispatch: null | |
... |