Skip to content

Commit fcd5bb2

Browse files
authored
Merge pull request #203 from Shopify/ap.js-tests
Add JS tests
2 parents 7b52a9b + 3793f8c commit fcd5bb2

File tree

48 files changed

+4941
-632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+4941
-632
lines changed

.github/workflows/javascript.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: JavaScript
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Install dependencies
15+
run: yarn
16+
- name: Expand liquid
17+
run: yarn expand-liquid vanilla-js
18+
- name: Install workspace dependencies
19+
run: yarn
20+
- name: Generate types
21+
run: yarn typegen
22+
- name: Test
23+
run: yarn test-js

.github/workflows/payment-methods.rust.default.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/rust.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
checks:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Add rustfmt and clippy
18+
run: rustup component add rustfmt clippy
19+
- name: Install node dependencies
20+
run: yarn
21+
- name: Expand liquid
22+
run: yarn expand-liquid rust
23+
- name: Run cargo fmt
24+
run: cargo fmt --check
25+
- name: Run clippy
26+
run: cargo clippy -- -D warnings
27+
- name: Run tests
28+
run: cargo test
29+
- name: Add wasm32-wasi target
30+
run: rustup target add wasm32-wasi
31+
- name: Build with wasm32-wasi target
32+
run: cargo build --release --target wasm32-wasi

.github/workflows/shipping-rate-presenter.rust.default.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/typescript.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: TypeScript
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Install dependencies
15+
run: yarn
16+
- name: Expand liquid
17+
run: yarn expand-liquid typescript
18+
- name: Install workspace dependencies
19+
run: yarn
20+
- name: Generate types
21+
run: yarn typegen
22+
- name: Test
23+
run: yarn test-ts

.gitignore

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ node_modules
99
## Extensions
1010
**/.output.graphql
1111
**/input.graphql
12-
**/Cargo.lock
13-
**/Cargo.toml
12+
*/rust/**/Cargo.lock
13+
*/rust/**/Cargo.toml
1414
**/shopify.function.extension.toml
15+
*/javascript/**/package.json
16+
*/javascript/**/src/*
17+
!*/javascript/**/src/*.liquid
1518
!sample-apps/**/input.graphql
16-
!sample-apps/**/Cargo.lock
17-
!sample-apps/**/Cargo.toml
1819
!sample-apps/**/shopify.function.extension.toml
1920

2021
## Sample Apps
2122
sample-apps/*/web/frontend/metafields.js
22-
!sample-apps/discounts/web/frontend/metafields.js
23+
!sample-apps/discounts/web/frontend/metafields.js

0 commit comments

Comments
 (0)