Skip to content

Commit

Permalink
Merge branch 'master' into mhucka-fix-qpc-test
Browse files Browse the repository at this point in the history
  • Loading branch information
mhucka authored Jan 19, 2025
2 parents 203026f + deb5b7d commit 4aa8628
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,7 @@ name: Continuous Integration

on: [pull_request]


jobs:
lint:
name: Lint check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.10'
architecture: 'x64'
- name: Install Lint tools
run: pip install --upgrade pip setuptools; pip install -r requirements.txt;
- name: Lint All
run: ./scripts/lint_all.sh

format:
name: Formatting check
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.10'
architecture: 'x64'
- name: Install Format tools
run: pip install --upgrade pip setuptools; pip install -r requirements.txt; sudo apt-get install -y clang-format-6.0
- name: Format Check
run: ./scripts/format_check.sh

wheel-build:
name: Wheel test
runs-on: ubuntu-20.04
Expand All @@ -55,7 +25,6 @@ jobs:
bazel-tests:
name: Library tests
runs-on: ubuntu-20.04
needs: [lint, format]

steps:
- uses: actions/checkout@v1
Expand All @@ -78,7 +47,6 @@ jobs:
# leak-tests:
# name: Memory Leak tests
# runs-on: ubuntu-20.04
# needs: [lint, format]
#
# steps:
# - uses: actions/checkout@v1
Expand All @@ -96,7 +64,7 @@ jobs:
tutorials-test:
name: Tutorial tests
runs-on: ubuntu-20.04
needs: [lint, format, wheel-build]
needs: wheel-build

steps:
- uses: actions/checkout@v1
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/ci-file-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI file checks

on: [pull_request]

jobs:
lint:
name: Lint check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.10'
architecture: 'x64'
- name: Install Lint tools
run: pip install --upgrade pip setuptools; pip install -r requirements.txt;
- name: Lint All
run: ./scripts/lint_all.sh

format:
name: Formatting check
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.10'
architecture: 'x64'
- name: Install Format tools
run: pip install --upgrade pip setuptools; pip install -r requirements.txt; sudo apt-get install -y clang-format-6.0
- name: Format Check
run: ./scripts/format_check.sh

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ sympy==1.12
numpy==1.24.2 # TensorFlow can detect if it was built against other versions.
nbformat==5.1.3
pylint==2.4.4
yapf==0.40.2
yapf==0.43.0
tensorflow==2.15.0
2 changes: 1 addition & 1 deletion scripts/lint_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
# ==============================================================================
echo "Checking for lint in python code...";
linting_outputs=$(pylint --rcfile .pylintrc ./tensorflow_quantum ./examples);
linting_outputs=$(pylint --rcfile .pylintrc ./tensorflow_quantum);
exit_code=$?
if [ "$exit_code" == "0" ]; then
echo "Python linting complete!";
Expand Down

0 comments on commit 4aa8628

Please sign in to comment.