-
Notifications
You must be signed in to change notification settings - Fork 1
feat: unit tests and project refactor #1
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
21 commits
Select commit
Hold shift + click to select a range
f10a41a
start node running of interface
professoralex13 9efbbf9
refactors
professoralex13 0d5f3b7
fix: update `memoryBuffer` after `malloc`
pepperoni505 be65bd0
refactor: add `test_out` directory, fix our path type implementation
pepperoni505 e864eca
refactor: project structure
professoralex13 041e1e2
feat: jest test environment
professoralex13 e8184dc
fix: stop lifecycle once tests completed
professoralex13 f0905f7
feat: automatic download
professoralex13 13a2d72
remove unnecessary package
professoralex13 e3eae75
refactor: Cleanup setup.ts
professoralex13 944c5d6
fix: make sh files executable
pepperoni505 bb5db6d
fix: have build run with docker
pepperoni505 04f2d9e
feat: test workflow
professoralex13 4e63866
fix: make test.sh executable
pepperoni505 e42ccb9
Update test.sh
professoralex13 2d718c3
test
professoralex13 f961282
Update setup.ts
professoralex13 c98847d
Create push.yml
professoralex13 5a9ac36
Update push.yml
professoralex13 e14dfdd
general fixes
professoralex13 a2cf8d9
fix: workspace issues
professoralex13 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
20 changes: 10 additions & 10 deletions
20
...wasm_navdata_interface/.cargo/config.toml → .cargo/config.toml
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 |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| [target.wasm32-wasi] | ||
| rustflags = [ | ||
| "-Clink-arg=--export-table", | ||
| "-Clink-arg=--export=malloc", | ||
| "-Clink-arg=--export=free", | ||
| "-Clink-arg=-L/usr/lib/llvm-15/lib/clang/15.0.7/lib/wasi", | ||
| "-Clink-arg=-lclang_rt.builtins-wasm32" | ||
| ] | ||
| [build] | ||
| [target.wasm32-wasi] | ||
| rustflags = [ | ||
| "-Clink-arg=--export-table", | ||
| "-Clink-arg=--export=malloc", | ||
| "-Clink-arg=--export=free", | ||
| "-Clink-arg=-L/usr/lib/llvm-15/lib/clang/15.0.7/lib/wasi", | ||
| "-Clink-arg=-lclang_rt.builtins-wasm32" | ||
| ] | ||
|
|
||
| [build] | ||
| target = "wasm32-wasi" |
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
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,24 @@ | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: create env file | ||
| run: | | ||
| touch .env | ||
| echo NAVDATA_SIGNED_URL=${{ secrets.NAVDATA_SIGNED_URL }} >> .env | ||
| - name: Build WASM module | ||
| run: npm run build:wasm-workflow | ||
| - name: Test | ||
| run: npm run test-workflow | ||
| - name: Upload WASM module to GitHub | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: msfs_navdata_interface.wasm | ||
| path: ./out/msfs_navdata_interface.wasm |
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
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,11 @@ | ||
| [workspace] | ||
| resolver = "2" | ||
|
|
||
| members = ["src/wasm"] | ||
|
|
||
| [profile.release] | ||
| lto = true | ||
| strip = true | ||
|
|
||
| [patch.crates-io] | ||
| rusqlite = { git = "https://github.com/navigraph/rusqlite", rev = "7921774" } |
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,9 @@ | ||
| // Add secret to global env | ||
|
|
||
| declare namespace NodeJS { | ||
| interface ProcessEnv { | ||
| // For test running | ||
| // Must be a client which supports password auth grants | ||
| NAVDATA_SIGNED_URL: string | ||
| } | ||
| } |
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,9 @@ | ||
| module.exports = { | ||
| testEnvironment: "node", | ||
| transform: { | ||
| "^.+\\.tsx?$": "ts-jest", | ||
| }, | ||
| testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", | ||
| moduleFileExtensions: ["ts", "js", "json", "node"], | ||
| setupFilesAfterEnv: ["./src/test/setup.ts"], | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.