From 8edee01ac45d2ee5f6e3a779c149cf72c5123eff Mon Sep 17 00:00:00 2001
From: Yuki Okushi <huyuumi.dev@gmail.com>
Date: Sat, 18 Jul 2020 15:12:51 +0900
Subject: [PATCH] Check examples on GHA

---
 .github/workflows/rust.yml | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 .github/workflows/rust.yml

diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
new file mode 100644
index 0000000..df53b3a
--- /dev/null
+++ b/.github/workflows/rust.yml
@@ -0,0 +1,33 @@
+name: Check examples
+
+on:
+  pull_request:
+    types: [opened, synchronize, reopened]
+  push:
+    branches:
+      - master
+
+env:
+  RUSTFLAGS: -A dead-code -A unused-variables
+
+jobs:
+  check-examples:
+    strategy:
+      fail-fast: false
+
+    name: Check examples
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@master
+
+      - name: Use stable
+        run: |
+          rustup override set stable
+          rustup update stable
+
+      - name: cargo check and cargo test
+        run: |
+          cd examples
+          cargo check
+          cargo test