forked from zapatacomputing/z-quantum-core
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 2.34 KB
/
style.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: style
# Controls when the action will run.
on:
push:
branches: [main, master, dev]
pull_request:
branches: [main, master, dev]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container:
image: zapatacomputing/z-quantum-default:latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install .
- name: Python Code Quality and Lint
# You may pin to the exact commit or the version.
# uses: ricardochaves/python-lint@32032eca67291cd71f88d79e61bc4b904ee03265
uses: ricardochaves/python-lint@v1.4.0
with:
# A list of all paths to test
python-root-list: "src/python/zquantum/core steps tests/zquantum/core tests/acceptance_tests"
use-pylint: false
use-pycodestyle: false
use-flake8: true
use-mypy: true
use-black: true
use-isort: true
# Extra options: pylint $(extra-pylint-options) $(python-root-list)
# extra-pylint-options: # optional, default is
# Extra options: pycodestyle $(extra-pycodestyle-options) $(python-root-list)
# extra-pycodestyle-options: # optional, default is
# Extra options: flake8 $(extra-flake8-options) $(python-root-list)
# Black's output doesn't pass all flake8 checks. We need to disable some of them.
extra-flake8-options: --ignore=E203,E266,F401,W503 --max-line-length=88
# Extra options: black --check $(extra-black-options) $(python-root-list)
extra-black-options: --check
# Extra options: mypy $(extra-mypy-options) $(python-root-list)
extra-mypy-options: --ignore-missing-imports --namespace-packages
# Extra options: isort -rc $(extra-isort-options) $(python-root-list) -c --diff
extra-isort-options: --check-only --profile black