From 8f14ccc56d96fea4ed2413856fac1e2ffbeeea2a Mon Sep 17 00:00:00 2001 From: Christian Fosli Date: Tue, 17 Mar 2020 15:02:12 +0100 Subject: [PATCH] Add CI example for GitHub Actions (#2044) * Add CI example for GitHub Actions * Don't rely on other GitHub actions --- .../continuous-integration.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/guide/src/wasm-bindgen-test/continuous-integration.md b/guide/src/wasm-bindgen-test/continuous-integration.md index 3cfab5ee..9e8823d9 100644 --- a/guide/src/wasm-bindgen-test/continuous-integration.md +++ b/guide/src/wasm-bindgen-test/continuous-integration.md @@ -53,3 +53,22 @@ test_script: - set GECKODRIVER=C:\Tools\WebDriver\geckodriver.exe - cargo test --target wasm32-unknown-unknown ``` + +## GitHub Actions + +```yaml +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Install + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + + - run: cargo test + - run: wasm-pack test --headless --chrome + - run: wasm-pack test --headless --firefox +```