Skip to content

Commit

Permalink
Test validate-rust-wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
giancosta86 committed Sep 6, 2024
1 parent c59bffb commit e1b30ca
Show file tree
Hide file tree
Showing 17 changed files with 1,760 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .github/test-actions/test-validate-rust-wasm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Test validate-rust-wasm

runs:
using: composite
steps:
- uses: ./actions/inject-branch-version
with:
artifact-file: ./tests/rust-wasm/Cargo.toml

- uses: ./actions/validate-rust-wasm
with:
project-directory: ./tests/rust-wasm
npm-scope: giancosta86
14 changes: 11 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,19 @@ jobs:
# - uses: actions/checkout@v4
# - uses: ./.github/test-actions/test-publish-rust-crate

test-publish-npm-package:
#test-publish-npm-package:
# runs-on: ubuntu-latest
# needs: check-preconditions
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/test-actions/test-publish-npm-package

test-validate-rust-wasm:
runs-on: ubuntu-latest
needs: check-preconditions
steps:
- uses: actions/checkout@v4
- uses: ./.github/test-actions/test-publish-npm-package
- uses: ./.github/test-actions/test-validate-rust-wasm

validate:
runs-on: ubuntu-latest
Expand All @@ -88,7 +95,8 @@ jobs:
# - test-validate-rust-crate
# - test-validate-npm-package
# - test-publish-rust-crate
- test-publish-npm-package
# - test-publish-npm-package
- test-validate-rust-wasm

steps:
- name: Test branch
Expand Down
4 changes: 4 additions & 0 deletions tests/rust-wasm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/target/
/pkg/
/**/*.rs.bk
/wasm-pack.log
289 changes: 289 additions & 0 deletions tests/rust-wasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions tests/rust-wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "test-wasm"
version = "0.0.0"
publish = false
edition = "2021"
description = "Test web assembly in Rust"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
wasm-bindgen = "0.2.92"

[dev-dependencies]
tsify = { version = "0.4.5", features = ["json"] }
wasm-bindgen-test = "0.3.42"

[profile.release]
opt-level = "s"
lto = true
1 change: 1 addition & 0 deletions tests/rust-wasm/client-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules/
1 change: 1 addition & 0 deletions tests/rust-wasm/client-tests/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.14.0
3 changes: 3 additions & 0 deletions tests/rust-wasm/client-tests/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules/
/dist/
/coverage/
17 changes: 17 additions & 0 deletions tests/rust-wasm/client-tests/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf",
"singleAttributePerLine": false
}
Loading

0 comments on commit e1b30ca

Please sign in to comment.