-
Notifications
You must be signed in to change notification settings - Fork 9
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
Enable poetry workflow #236
Closed
Closed
Changes from 13 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
cabf30b
optionally use tox pack
jdkandersson 03a903c
install tox
jdkandersson cebc5c2
correct or operator
jdkandersson a2865c4
Use the tox wrapper for charmcraft
nrobinaubertin 363c392
Add tox install before charm packing
nrobinaubertin 3da89c0
Install poetry for unit tests
nrobinaubertin c34532e
Add poetry-export-plugin
nrobinaubertin 9018b2a
Fix poetry-plugin-export install
nrobinaubertin 0eda72c
Remove deps test incompatible with poetry
nrobinaubertin 19be9ed
Fall back to plain charmcraft when `tox pack` fails
nrobinaubertin e682e7c
Merge origin/charmcraft-tox-wrapper
nrobinaubertin d81c860
Install poetry in integration_test wf
nrobinaubertin 902ab08
Remove poetry install (will be done from tox)
nrobinaubertin 76c534a
Merge branch 'main' into dependency-version-pin
nrobinaubertin 6ec606d
Merge origin/main
nrobinaubertin 7c5d447
Test tox pack
nrobinaubertin 5885ca3
Merge branch 'main' into dependency-version-pin
nrobinaubertin f8e5e5d
Build
nrobinaubertin f60f3ea
Merge
nrobinaubertin 486fe85
Merge branch 'main' into dependency-version-pin
nrobinaubertin 10aa71f
Merge branch 'main' into dependency-version-pin
nrobinaubertin 3e56a33
Point to the modified branch for the build plan
nrobinaubertin 782048e
Merge branch 'dependency-version-pin' of github.com:canonical/operato…
nrobinaubertin 62dc359
Support poetry and classic wfs
nrobinaubertin ad1425b
Merge branch 'main' into dependency-version-pin
nrobinaubertin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,51 +216,6 @@ jobs: | |
STDOUT_LOG=$(mktemp --suffix=stdout.log) | ||
echo STDOUT_LOG=$STDOUT_LOG >> $GITHUB_ENV | ||
tox --result-json=test-result.json | tee $STDOUT_LOG ; test ${PIPESTATUS[0]} -eq 0 | ||
- name: Check lint and test stdout | ||
run: | | ||
# Check dependencies | ||
EXPECTED_LINT_DEPS="\ | ||
mypy \ | ||
isort \ | ||
black \ | ||
flake8-docstrings \ | ||
flake8-docstrings-complete \ | ||
flake8-builtins \ | ||
flake8-test-docs \ | ||
pep8-naming \ | ||
codespell \ | ||
pylint \ | ||
pydocstyle \ | ||
" | ||
for EXPECTED_LINT_DEP in $EXPECTED_LINT_DEPS; do | ||
# Check that there is a `lint...<dependency>` line for each of the expected dependencies | ||
DEP_REGEX="lint.*$EXPECTED_LINT_DEP" | ||
if ! grep -q "$DEP_REGEX" $STDOUT_LOG ; then | ||
# Write to stderr | ||
>&2 echo "$EXPECTED_LINT_DEP should be in deps of [testenv:lint] environment in tox.ini" | ||
exit 1 | ||
fi | ||
done | ||
|
||
# Check commands | ||
EXPECTED_LINT_CMDS="\ | ||
pydocstyle \ | ||
codespell \ | ||
flake8 \ | ||
isort \ | ||
black \ | ||
mypy \ | ||
pylint \ | ||
" | ||
for EXPECTED_LINT_CMD in $EXPECTED_LINT_CMDS; do | ||
# Check that there is a `lint...commands...<command>` line for each of the expected commands | ||
CMD_REGEX="lint.*commands.*$EXPECTED_LINT_CMD" | ||
if ! grep -q "$CMD_REGEX" $STDOUT_LOG ; then | ||
# Write to stderr | ||
>&2 echo "$EXPECTED_LINT_CMD should be in commands of [testenv:lint] environment in tox.ini" | ||
exit 1 | ||
fi | ||
done | ||
- name: Export test report | ||
if: always() && !cancelled() | ||
uses: actions/[email protected] | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for removing this please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using poetry, the dependencies will be handled in the
pyproject.toml
file and this test will always failThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it somehow be adapted so that we still get the benefits please? It is checking here that the expected tools are being run which is quite helpful to make sure that the expected linting is actually being done in a given repo