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

fix(wasm): add test-ext-api feature to mm2_main and mm2_bin_lib tomls #2295

Merged
merged 6 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
15 changes: 12 additions & 3 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,16 @@ jobs:
- name: Check PR labels
env:
LABEL_NAMES: ${{ toJson(github.event.pull_request.labels.*.name) }}
if: contains(env.LABEL_NAMES, 'under review') == contains(env.LABEL_NAMES, 'in progress')
run: |
echo "PR must have "exactly one" of these labels: ['under review', 'in progress']."
exit 1
# Filter labels starting with "status:"
STATUS_LABELS=$(echo $LABEL_NAMES | jq -r '.[] | select(startswith("status:"))')
STATUS_COUNT=$(echo "$STATUS_LABELS" | wc -l)

echo "Found status labels: $STATUS_LABELS"
echo "Count of status labels: $STATUS_COUNT"

if [ "$STATUS_COUNT" -ne 1 ]
then
echo "PR must have exactly one label starting with 'status:'. Found $STATUS_COUNT."
exit 1
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this much change here I think

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just need to replace the old labels, I don't know why we changed the entire logic

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just need to replace the old labels, I don't know why we changed the entire logic

I decided that almost all status labels are valid and can pass the PR lint. Are you suggesting allowing only the 'pending review' and 'in progress' statuses to pass the lint check?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Label validation logic was simple: requiring one of "in progress" or "under review" labels but not both at the same time. We can update this logic with new ones + blocked label.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can update this logic with new ones + blocked label.

That what I wanted to do, allow new status labels except invalid statuses, just without rewriting all statuses manually.
But I think now, its better to be explicit with labels in pr lint for the case if we add new status labels in the future

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean all new labels, what I mean is these 3 labels:

  • status: pending review
  • status: blocked
  • status: in progress

1 change: 1 addition & 0 deletions mm2src/mm2_bin_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ custom-swap-locktime = ["mm2_main/custom-swap-locktime"] # only for testing purp
native = ["mm2_main/native"] # Deprecated
track-ctx-pointer = ["mm2_main/track-ctx-pointer"]
zhtlc-native-tests = ["mm2_main/zhtlc-native-tests"]
test-ext-api = ["mm2_main/test-ext-api"]

[[bin]]
name = "mm2"
Expand Down
1 change: 1 addition & 0 deletions mm2src/mm2_main/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ run-device-tests = []
enable-sia = ["coins/enable-sia", "coins_activation/enable-sia"]
sepolia-maker-swap-v2-tests = []
sepolia-taker-swap-v2-tests = []
test-ext-api = ["trading_api/test-ext-api"]

[dependencies]
async-std = { version = "1.5", features = ["unstable"] }
Expand Down
Loading