File tree Expand file tree Collapse file tree 2 files changed +69
-11
lines changed Expand file tree Collapse file tree 2 files changed +69
-11
lines changed Original file line number Diff line number Diff line change 1+ name : Lint Python code
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - ' .github/workflows/lint-python.yml'
7+ - ' compilesketches/**.py'
8+
9+ push :
10+ paths :
11+ - ' .github/workflows/lint-python.yml'
12+ - ' compilesketches/**.py'
13+
14+ # Scheduled trigger checks for workflow failures resulting from updates to the linting tools
15+ schedule :
16+ # run every Tuesday at 3 AM UTC
17+ - cron : " 0 3 * * 2"
18+
19+ # workflow_dispatch event allows the workflow to be triggered manually
20+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
21+ workflow_dispatch :
22+
23+ # repository_dispatch event allows the workflow to be triggered via the GitHub API
24+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
25+ repository_dispatch :
26+
27+ jobs :
28+ lint :
29+ runs-on : ubuntu-latest
30+
31+ steps :
32+ - name : Checkout
33+ uses : actions/checkout@v2
34+
35+ - name : Set up Python
36+ uses : actions/setup-python@v1
37+ with :
38+ python-version : ' 3.8.5'
39+
40+ - name : Install flake8
41+ run : |
42+ python -m pip install --upgrade pip
43+ pip install --quiet flake8
44+ pip install --quiet pep8-naming
45+
46+ - name : Lint with flake8
47+ env :
48+ PYTHON_PROJECT_PATH : ${GITHUB_WORKSPACE}/compilesketches
49+ run : |
50+ flake8 --config "${{ env.PYTHON_PROJECT_PATH }}/.flake8" --show-source "${{ env.PYTHON_PROJECT_PATH }}"
Original file line number Diff line number Diff line change 1- name : libraries/compile-examples workflow
1+ name : Test Python code
22
33on :
44 pull_request :
55 paths :
6- - ' .github/workflows/libraries_compile-examples .yml'
7- - ' libraries/compile-examples /**'
6+ - ' .github/workflows/test-python .yml'
7+ - ' compilesketches /**'
88
99 push :
1010 paths :
11- - ' .github/workflows/libraries_compile-examples.yml'
12- - ' libraries/compile-examples/**'
11+ - ' .github/workflows/test-python.yml'
12+ - ' compilesketches/**'
13+
14+ # The actions/setup-python action will periodically break the workflow by dropping the Python version we have pinned
15+ # Better to catch that before it causes confusion for a contributor
16+ schedule :
17+ # run every Tuesday at 3 AM UTC
18+ - cron : " 0 3 * * 2"
19+
20+ # workflow_dispatch event allows the workflow to be triggered manually
21+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
22+ workflow_dispatch :
23+
24+ # repository_dispatch event allows the workflow to be triggered via the GitHub API
25+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
26+ repository_dispatch :
1327
1428jobs :
1529 test :
3347 python -m pip install --upgrade pip
3448 pip install --requirement "${{ env.PYTHON_PROJECT_TESTS_PATH }}/requirements.txt"
3549
36- - name : Lint with flake8
37- run : |
38- pip install --quiet flake8
39- pip install --quiet pep8-naming
40- flake8 --config "${{ env.PYTHON_PROJECT_PATH }}/.flake8" --show-source "${{ env.PYTHON_PROJECT_PATH }}"
41-
4250 - name : Run Python unit tests and report code coverage
4351 run : |
4452 export PYTHONPATH="${{ env.PYTHON_PROJECT_PATH }}"
You can’t perform that action at this time.
0 commit comments