-
Notifications
You must be signed in to change notification settings - Fork 79
Add dart github workflow #876
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: Build and Test Dart | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - payjoin-ffi/** | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ${{ matrix.os }} | ||
| defaults: | ||
| run: | ||
| working-directory: payjoin-ffi/dart | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, macos-13] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: "Install Rust 1.85.0" | ||
| uses: dtolnay/rust-toolchain@1.85.0 | ||
|
|
||
| - name: Install Dart | ||
| uses: dart-lang/setup-dart@v1 | ||
| with: | ||
| sdk: stable | ||
|
|
||
| - name: "Use cache" | ||
| uses: Swatinem/rust-cache@v2 | ||
|
|
||
| - name: Generate bindings and binaries | ||
| run: | | ||
| if [ "${{ matrix.os }}" = "macos-13" ]; then | ||
| bash ./scripts/generate_macos.sh | ||
| else | ||
| bash ./scripts/generate_linux.sh | ||
| fi | ||
|
|
||
| - name: Run tests | ||
| # Skip integration test on macOS due to Docker issues | ||
| run: | | ||
| if [ "${{ matrix.os }}" = "macos-13" ]; then | ||
| dart test "test/test_payjoin_unit_test.dart" | ||
| else | ||
| dart test | ||
| fi | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Payjoin Dart Bindings | ||
|
|
||
| Welcome to the Dart language bindings for the [Payjoin Dev Kit](https://payjoindevkit.org/)! | ||
|
|
||
| ## Running Tests | ||
|
|
||
| Follow these steps to clone the repository and run the tests. | ||
|
|
||
|
|
||
| ```shell | ||
| git clone https://github.com/payjoin/rust-payjoin.git | ||
| cd rust-payjoin/payjoin-ffi/dart | ||
|
|
||
| # Generate the bindings (use the script appropriate for your platform) | ||
| bash ./scripts/generate_<platform>.sh | ||
|
|
||
| # Run all tests | ||
| dart test | ||
| ``` | ||
|
|
||
| Note that you'll need Docker to run the integration tests. If you get a "Failed to start container" error, ensure the Docker engine is running on your machine. |
This file contains hidden or 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 hidden or 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 hidden or 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
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.
I know we reverted this back to expand and look at all changes within the ffi repo as laid out in #722 but would it maybe be worth exploring some more targeted paths like? And then do the same for the python workflows so there aren't uneeded tests
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.
Or also exclusionary to cover things like
build.rschangingThere 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.
I think the simplicity of "any payjoin-ffi change triggers CI for all FFI languages" is worth keeping to prevent issues slipping by unnoticed.