Skip to content

Commit

Permalink
Add a tox.ini example in content-best-practices
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed Dec 14, 2023
1 parent 92fc7f0 commit 10f2a02
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
devel
libera
testenv
14 changes: 14 additions & 0 deletions docs/user-guide/content-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ Integrating lint into your Continuous Integration (CI) pipeline ensures that you
To add Tox Entry for Linting:

1. Create a `tox.ini` file in the root directory of your project. This file will contain the configuration for running various environments.

```ini
# tox.ini
[tox]
env_list = lint

[testenv:lint]
deps =
pre-commit
# Add other linters as needed
commands =
pre-commit run --show-diff-on-failure --all-files
```

2. Update your CI configuration file (for example `.github/workflows/main.yml` for GitHub Actions) to include the tox command with the linting environment.
3. Commit the changes to your repository and push them, to trigger the CI pipeline.

Expand Down

0 comments on commit 10f2a02

Please sign in to comment.