🔧 Lint only in Python 3.7 and above
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 02507a9d0154c..7ab0f1230775f 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -32,6 +32,9 @@ jobs:
       - name: Install Dependencies
         if: steps.cache.outputs.cache-hit != 'true'
         run: flit install --symlink
+      - name: Lint
+        if: ${{ matrix.python-version != '3.6' }}
+        run: bash scripts/lint.sh
       - name: Test
         run: bash scripts/test.sh
       - name: Upload coverage
diff --git a/scripts/test.sh b/scripts/test.sh
index 74ed7a1f19adc..d445ca174200b 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -3,7 +3,6 @@
 set -e
 set -x
 
-bash ./scripts/lint.sh
 # Check README.md is up to date
 python ./scripts/docs.py verify-readme
 export PYTHONPATH=./docs_src

🔧 Lint only in Python 3.7 and above