Skip to content

Commit

Permalink
Run examples tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gligneul committed Jan 23, 2025
1 parent 4e4fee2 commit e68d31c
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/end-to-end.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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
34 changes: 34 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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: Add rustup target
run: |
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

0 comments on commit e68d31c

Please sign in to comment.