Add CI example for GitHub Actions (#2044)

* Add CI example for GitHub Actions

* Don't rely on other GitHub actions
This commit is contained in:
Christian Fosli
2020-03-17 15:02:12 +01:00
committed by GitHub
parent 5acd6a3451
commit 8f14ccc56d

View File

@ -53,3 +53,22 @@ test_script:
- set GECKODRIVER=C:\Tools\WebDriver\geckodriver.exe - set GECKODRIVER=C:\Tools\WebDriver\geckodriver.exe
- cargo test --target wasm32-unknown-unknown - 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
```