Verified Commit d8d6f93f authored by Maksym Hlukhovtsov's avatar Maksym Hlukhovtsov
Browse files

remove gha pre-commit, and replace with gitlab

parent d124de91
Pipeline #200487 failed with stages
in 28 seconds
name: pre-commit
on:
pull_request:
push:
branches: [master]
env:
CI: true
PYTHON_VERSION: 3.8.12
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use cached node_modules
uses: actions/cache@v1
with:
path: node_modules
key: node_modules+${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn install --immutable
- name: Set up pre-commit environment
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Get pip cache dir
id: get-pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Use cached pre-commit environment
uses: actions/cache@v3
with:
path: |
~/.cache/pre-commit
${{ steps.get-pip-cache.outputs.dir }}
key: py-lints+${{ env.PYTHON_VERSION }}+${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
......@@ -13,8 +13,7 @@
],
"scripts": {
"typecheck": "tsc --noEmit",
"lint": "yarn eslint && yarn typecheck && yarn prettier",
"prettier": "prettier --check '{*,**/*}.json'",
"lint": "pre-commit run --color=always --all --show-diff-on-failure",
"fix:eslint": "eslint --fix",
"fix:prettier": "prettier --write",
"fix": "yarn fix:eslint '{*,**/*}.{js,ts}' && yarn fix:prettier '{*,**/*}.json'",
......@@ -35,6 +34,7 @@
"@resolritter/tsc-files": "^1.1.4",
"@types/node": "^16.10.3",
"dotenv": "^16.0.1",
"eslint-plugin-prettier": "^4.1.0",
"nodemon": "^2.0.13",
"opstooling-js-style": "https://github.com/paritytech/opstooling-js-style#master",
"prettier": "^2.7.1",
......
......@@ -2902,6 +2902,13 @@ eslint-plugin-prettier@^4.0.0:
dependencies:
prettier-linter-helpers "^1.0.0"
eslint-plugin-prettier@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.1.0.tgz#1cd4b3fadf3b3cdb30b1874b55e7f93f85eb43ad"
integrity sha512-A3AXIEfTnq3D5qDFjWJdQ9c4BLhw/TqhSR+6+SVaoPJBAWciFEuJiNQh275OnjRrAi7yssZzuWBRw66VG2g6UA==
dependencies:
prettier-linter-helpers "^1.0.0"
eslint-plugin-simple-import-sort@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-7.0.0.tgz#a1dad262f46d2184a90095a60c66fef74727f0f8"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment