Add test runner #1
This file contains hidden or 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: Build and Test | |
| on: | |
| push: | |
| branches: [ "chore/test_runner" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - run: rustup target add wasm32-unknown-unknown | |
| - name: Install stellar-scaffold-cli | |
| run: cargo install --git https://github.com/ahalabs/scaffold-stellar stellar-scaffold-cli | |
| - name: Build & build clients with Loam | |
| run: STELLAR_SCAFFOLD_ENV=testing stellar-scaffold build --build-clients | |
| - run: npm run build | |
| - name: Run tests | |
| run: npm test --if-present |