From 77157a5fe1da43d4bf04e90edb16cf9fa1d49055 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi <hirrolot@gmail.com> Date: Tue, 31 Mar 2020 13:30:16 +0600 Subject: [PATCH 1/6] Test the examples in CI --- .github/workflows/ci.yml | 3 +++ .github/workflows/test_examples.sh | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 .github/workflows/test_examples.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f45616a..a0ccac87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,3 +70,6 @@ jobs: with: command: fmt args: --all -- --check + + - name: Test the examples + command: ./test_examples.sh diff --git a/.github/workflows/test_examples.sh b/.github/workflows/test_examples.sh new file mode 100644 index 00000000..e3c03f1a --- /dev/null +++ b/.github/workflows/test_examples.sh @@ -0,0 +1,9 @@ +##!/bin/sh + +cd ../../ + +for example in examples/*; do + echo Testing $example... + cd $example; cargo check; cd ../..; +done + From 45ef3f84915cd8b121cb373ae4fd2a2fd76ba67e Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi <hirrolot@gmail.com> Date: Tue, 31 Mar 2020 13:32:06 +0600 Subject: [PATCH 2/6] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0ccac87..af143348 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,4 +72,4 @@ jobs: args: --all -- --check - name: Test the examples - command: ./test_examples.sh + run: ./test_examples.sh From 6424c05828347bcb4168578673862cc33edc6210 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi <hirrolot@gmail.com> Date: Tue, 31 Mar 2020 13:38:48 +0600 Subject: [PATCH 3/6] Update ci.yml --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af143348..9a6102c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,12 +64,12 @@ jobs: command: clippy args: --all-targets --all-features -- -D warnings + - name: Test the examples + run: ./.github/workflows/test_examples.sh + - name: fmt uses: actions-rs/cargo@v1 if: matrix.rust == 'nightly' with: command: fmt args: --all -- --check - - - name: Test the examples - run: ./test_examples.sh From 68904e3a5a2da1b4dfc546694749495494d7f42d Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi <hirrolot@gmail.com> Date: Tue, 31 Mar 2020 13:49:55 +0600 Subject: [PATCH 4/6] Fix ci.yml --- .github/workflows/ci.yml | 2 +- .github/workflows/test_examples.sh | 9 --------- examples/test_examples.sh | 7 +++++++ 3 files changed, 8 insertions(+), 10 deletions(-) delete mode 100644 .github/workflows/test_examples.sh create mode 100644 examples/test_examples.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a6102c8..38ae1e66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: args: --all-targets --all-features -- -D warnings - name: Test the examples - run: ./.github/workflows/test_examples.sh + run: ./examples/test_examples.sh - name: fmt uses: actions-rs/cargo@v1 diff --git a/.github/workflows/test_examples.sh b/.github/workflows/test_examples.sh deleted file mode 100644 index e3c03f1a..00000000 --- a/.github/workflows/test_examples.sh +++ /dev/null @@ -1,9 +0,0 @@ -##!/bin/sh - -cd ../../ - -for example in examples/*; do - echo Testing $example... - cd $example; cargo check; cd ../..; -done - diff --git a/examples/test_examples.sh b/examples/test_examples.sh new file mode 100644 index 00000000..195a3b4c --- /dev/null +++ b/examples/test_examples.sh @@ -0,0 +1,7 @@ +##!/bin/sh + +for example in */; do + echo Testing $example... + cd $example; cargo check; cd ..; +done + From bcabcd3c2d32d8de53c66fc3ddf335312a855dbf Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi <hirrolot@gmail.com> Date: Tue, 31 Mar 2020 13:56:23 +0600 Subject: [PATCH 5/6] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38ae1e66..d56ec9c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: args: --all-targets --all-features -- -D warnings - name: Test the examples - run: ./examples/test_examples.sh + run: bash examples/test_examples.sh - name: fmt uses: actions-rs/cargo@v1 From 6f17529e7af0db0ff47f938a487616af5ee7622b Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi <hirrolot@gmail.com> Date: Tue, 31 Mar 2020 21:45:22 +0600 Subject: [PATCH 6/6] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d56ec9c9..2c3af7b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: args: --all-targets --all-features -- -D warnings - name: Test the examples - run: bash examples/test_examples.sh + run: cd examples && bash test_examples.sh - name: fmt uses: actions-rs/cargo@v1