Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tox.yml and update tox.ini based on eda-partner-testing #135

Merged
merged 24 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
15edc80
Add tox.yml and update tox.ini based on eda-partner-testing
eclarizio Jun 15, 2023
4c65c71
Fix all auto-fixable ruff issues
eclarizio Jun 15, 2023
50af8ff
Change tox to only run ruff for now
eclarizio Jun 20, 2023
4f43f78
Fix some ruff issues in dashes_to_underscores.py
eclarizio Jun 20, 2023
5586984
Fix ruff issues in insert_hosts_to_meta.py
eclarizio Jun 20, 2023
a25b4b0
Fix ruff issues in json_filter.py
eclarizio Jun 20, 2023
cfd3860
Fix ruff issues in noop.py
eclarizio Jun 20, 2023
f061721
Fix some ruff issues in normalize_keys.py
eclarizio Jun 20, 2023
5a93c3f
Fix some ruff issues in alertmanager.py
eclarizio Jun 20, 2023
97625e1
Fix some ruff issues in aws_cloudtrail.py
eclarizio Jun 20, 2023
498d875
Fix some ruff issues in aws_sqs_queue.py
eclarizio Jun 20, 2023
c342568
Fix some ruff issues in azure_service_bus.py
eclarizio Jun 20, 2023
3a2ed23
Fix some ruff issues in file.py
eclarizio Jun 20, 2023
4ac56fa
Fix some ruff issues in file_watch.py
eclarizio Jun 20, 2023
4432843
Fix some ruff issues in generic.py
eclarizio Jun 20, 2023
8f10635
Fix some ruff issues in journald.py
eclarizio Jun 20, 2023
821a059
Fix some ruff issues in kafka.py
eclarizio Jun 20, 2023
8dbc2d4
Fix some ruff issues in range.py
eclarizio Jun 20, 2023
fc3bb7b
Fix some ruff issues in tick.py
eclarizio Jun 20, 2023
eeb6197
Fix some ruff issues in url_check.py
eclarizio Jun 20, 2023
9c17bd9
Fix some ruff issues in webhook.py
eclarizio Jun 20, 2023
55d18b3
Fix remaining ruff issues
bzwei Jun 22, 2023
85a6b4a
Drop python3.8 for tests
bzwei Jun 26, 2023
1e64fa4
Ignore UP038 because python3.9 does not support it
bzwei Jun 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/tox.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# this template can be adjusted as needed for your CI environment. the paths in the `commands` of each tox env linter can be changed if the tox file sits in a different location than expected in this template
# Recommended usage of this file is detailed in https://github.com/ansible/eda-partner-testing/blob/main/README.md.
# The linter paths can be changed, but may result in false passes.
# {posargs} in this case would be the path to collection root relative from the .github/workflows dir (`../..`)

[tox]
envlist = ruff, darglint, pylint-event-source, pylint-event-filter
requires =
Expand All @@ -15,9 +18,8 @@ commands = ruff check --select ALL --ignore INP001 -q {posargs}/extensions/eda/p
deps = darglint
commands = darglint -s numpy -z full {posargs}/extensions/eda/plugins

# depending on what kind of plugins you have, remove the line you don't need (i.e event_sources or event_filters, remove the pylint call for the other one)
# depending on how your collection and repo is structured, you may need to change the path to each type of plugin
# if pylint warns about missing __init__.py files in directories, there's no need to include them if you ensure that the paths in the below pylint `commands` point directly to the *.py files under the event_source/ and event_filter/ dirs, as shown in the template path here

# If you dont have any event_source or event_filter plugins, remove the corresponding testenv
[testenv:pylint-event-source]
deps = pylint
commands = pylint {posargs}/extensions/eda/plugins/event_source/*.py --output-format=parseable -sn --disable R0801
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
on: [push, pull_request]
name: Tox
jobs:
tox:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install deps
run: python -m pip install tox
- name: Move to tox conf file and run tox
run: |
cd .github/workflows
python -m tox -- ../..