Skip to content

Commit

Permalink
chore: add example test
Browse files Browse the repository at this point in the history
Jason I committed Apr 24, 2024
1 parent 3a6c7a6 commit fc0b2ca
Showing 5 changed files with 34 additions and 27 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/check-interface-spec-compatibility.yml
Original file line number Diff line number Diff line change
@@ -84,7 +84,21 @@ jobs:
- name: Build and deploy all examples
run: |
.github/workflows/hosting-photo-storage-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/hosting-static-website-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/hosting-unity-webgl-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-actor-reference.test.sh
.github/workflows/motoko-basic-bitcoin.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-basic-bitcoin.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-basic-dao-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-calc-example.test.sh
10 changes: 10 additions & 0 deletions .github/workflows/motoko-basic-dao-example.test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
dfx start --background
pushd motoko/basic_dao
dfx canister create basic_dao
dfx build
(for f in tests/*.test.sh; do
echo "==== Run test $f ===="
ic-repl -r "http://localhost:$(dfx info webserver-port)" "$f" || exit
done)
popd
20 changes: 2 additions & 18 deletions .github/workflows/motoko-basic-dao-example.yml
Original file line number Diff line number Diff line change
@@ -22,15 +22,7 @@ jobs:
run: bash .github/workflows/provision-darwin.sh
- name: Motoko DAO Darwin
run: |
dfx start --background
pushd motoko/basic_dao
dfx canister create basic_dao
dfx build
(for f in tests/*.test.sh; do
echo "==== Run test $f ===="
ic-repl -r "http://localhost:$(dfx info webserver-port)" "$f" || exit
done)
popd
.github/workflows/motoko-basic-dao-example.test.sh
motoko-hello-linux:
runs-on: ubuntu-20.04
steps:
@@ -39,12 +31,4 @@ jobs:
run: bash .github/workflows/provision-linux.sh
- name: Motoko DAO Linux
run: |
dfx start --background
pushd motoko/basic_dao
dfx canister create basic_dao
dfx build
(for f in tests/*.test.sh; do
echo "==== Run test $f ===="
ic-repl -r "http://localhost:$(dfx info webserver-port)" "$f" || exit
done)
popd
.github/workflows/motoko-basic-dao-example.test.sh
5 changes: 5 additions & 0 deletions .github/workflows/motoko-calc-example.test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
dfx start --background
pushd motoko/calc
make test
popd
10 changes: 2 additions & 8 deletions .github/workflows/motoko-calc-example.yaml
Original file line number Diff line number Diff line change
@@ -22,10 +22,7 @@ jobs:
run: bash .github/workflows/provision-darwin.sh
- name: Motoko Calc Darwin
run: |
dfx start --background
pushd motoko/calc
make test
popd
.github/workflows/motoko-calc-example.test.sh
motoko-calc-example-linux:
runs-on: ubuntu-20.04
steps:
@@ -34,7 +31,4 @@ jobs:
run: bash .github/workflows/provision-linux.sh
- name: Motoko Calc Linux
run: |
dfx start --background
pushd motoko/calc
make test
popd
.github/workflows/motoko-calc-example.test.sh

0 comments on commit fc0b2ca

Please sign in to comment.