Add end-to-end tests to examples. #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: End-to-end Tests | |
on: | |
push: | |
branches: | |
- stylus | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test-examples: | |
runs-on: ubuntu-latest | |
name: ${{ matrix.example }} | |
strategy: | |
matrix: | |
example: [ | |
single_call | |
] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: install rustup | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh | |
sh rustup-init.sh -y --default-toolchain none | |
rustup target add wasm32-unknown-unknown | |
rustup target add wasm32-wasi | |
- name: Cargo stylus | |
run: | | |
RUSTFLAGS="-C link-args=-rdynamic" cargo install --force cargo-stylus | |
- name: Run end-to-end test | |
working-directory: examples/${{ matrix.example }} | |
run: cargo test -F export-abi --test devnet -- --show-output |