Feat: Add App Package #351
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: ["main"] | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| PKG_CONFIG_PATH: /usr/lib/pkgconfig | |
| PUBLIC_STELLAR_NETWORK: local | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| runner/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - run: rustup target add wasm32v1-none | |
| - run: | |
| sudo apt-get update && sudo apt-get install -y libudev-dev | |
| libdbus-1-dev pkg-config | |
| - name: Install cargo-binstall | |
| uses: cargo-bins/cargo-binstall@v1.15.6 | |
| - name: Check for stellar-scaffold binary | |
| run: | | |
| if ! command -v stellar-scaffold &> /dev/null; then | |
| echo "stellar-scaffold not found, installing..." | |
| cargo binstall stellar-scaffold-cli | |
| else | |
| echo "stellar-scaffold already installed. Clear cache to force reinstall." | |
| fi | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npx prettier . --check | |
| - name: Build clients before building the project | |
| run: | |
| STELLAR_SCAFFOLD_ENV=development stellar-scaffold build | |
| --build-clients | |
| - run: npm run install:contracts | |
| - run: npm run build | |
| - name: Run tests | |
| run: npm test --if-present |