Skip to content

Commit e2accfb

Browse files
authored
Fix smoke tests (#370)
* Fix smoke tests * More workflow corrections. * Remove more tests
1 parent 6cc15fb commit e2accfb

3 files changed

Lines changed: 28 additions & 12 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,7 @@ jobs:
8888
git commit -m initial
8989
pip install .
9090
pip install .[dev]
91-
92-
- name: pylint checks
93-
if: ${{ contains (matrix.copier_config.name, 'Base') }}
94-
run: |
95-
cd ../test/${{ matrix.copier_config.foldername }}
96-
python -m pylint --recursive=y ./src/ --rcfile=./src/.pylintrc
97-
91+
9892
- name: black checks
9993
uses: psf/black@stable
10094
with:

python-project-template/.github/workflows/{% if mypy_type_checking != 'none' %}type-checking.yml{% endif %}.jinja renamed to python-project-template/.github/workflows/code_style.yml.jinja

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# This workflow will install Python dependencies, then perform static type checking analysis.
1+
# This workflow will install Python dependencies, then perform static analysis for code style and type checking.
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: mypy Type checking
4+
name: Code Style analysis
55

66
on:
77
push:
@@ -33,11 +33,31 @@ jobs:
3333
pip install .
3434
pip install .[dev]
3535
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
36+
{%- if mypy_type_checking == 'basic' -%}
3637
- name: Analyze code with mypy
37-
{% if mypy_type_checking == 'basic' %}
3838
run: |
3939
mypy ./src ./tests --ignore-missing-imports
40-
{% elif mypy_type_checking == 'strict' %}
40+
{%- elif mypy_type_checking == 'strict' -%}
41+
- name: Analyze code with mypy
4142
run: |
4243
mypy ./src ./tests --strict
43-
{% endif -%}
44+
{%- endif -%}
45+
{%- if 'black' in enforce_style -%}
46+
- name: Analyze code for black formatting
47+
run: |
48+
black --check .
49+
{%- endif -%}
50+
{%- if 'pylint' in enforce_style -%}
51+
- name: Analyze code with pylint
52+
run: |
53+
pylint -rn -sn --recursive=y ./src --rcfile=./src/.pylintrc
54+
pylint -rn -sn --recursive=y ./tests --rcfile=./tests/.pylintrc
55+
{%- if include_benchmarks %}
56+
pylint -rn -sn --recursive=y ./benchmarks --rcfile=./tests/.pylintrc
57+
{%- endif -%}
58+
{%- endif -%}
59+
{%- if 'ruff' in enforce_style -%}
60+
- name: Analyze code with ruff
61+
ruff format --check
62+
ruff check
63+
{%- endif -%}

‎python-project-template/.github/workflows/smoke-test.yml.jinja‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
- name: Send failure email
4646
{%- endif %}
4747
{%- if 'slack' in failure_notification %}
48+
{%- raw %}
4849
- name: Send status to Slack app
4950
if: ${{ failure() && github.event_name != 'workflow_dispatch' }} # Only post if the workflow failed and was not manually started. Customize this as necessary./
5051
id: slack
@@ -83,4 +84,5 @@ jobs:
8384
env:
8485
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # Here is where the webhook URL is provided
8586
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
87+
{%- endraw %}
8688
{%- endif %}

0 commit comments

Comments
 (0)