diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index dd2df25774..b075805a3f 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -8,7 +8,15 @@ on: jobs: pre-commit: runs-on: ubuntu-20.04 + defaults: + run: + shell: bash -el {0} steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: conda-incubator/setup-miniconda@v2 + with: + python-version: '3.10' + activate-environment: "coverage" + channel-priority: "disabled" + environment-file: environment/coverage.yml - uses: pre-commit/action@v2.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19615e0f10..1753b7a3fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,3 +47,17 @@ repos: args: ["-i"] exclude: "numba_dpex/dpnp_iface" types_or: [c++, c] +- repo: local + hooks: + - id: pylint + name: pylint + entry: pylint + files: ^numba_dpex/experimental + language: system + types: [python] + require_serial: true + args: + [ + "-rn", # Only display messages + "-sn", # Don't display the score + ] diff --git a/environment/pre-commit.yml b/environment/pre-commit.yml new file mode 100644 index 0000000000..2a26800475 --- /dev/null +++ b/environment/pre-commit.yml @@ -0,0 +1,24 @@ +name: dev +channels: + - dppy/label/dev + - numba + - intel + - conda-forge + - nodefaults +dependencies: + - libffi + - gxx_linux-64 + - dpcpp_linux-64 + - numba==0.58* + - dpctl + - dpnp + - dpcpp-llvm-spirv + - opencl_rt + - coverage + - pytest + - pytest-cov + - pytest-xdist + - pexpect + - scikit-build>=0.15* + - cmake>=3.26* + - pylint