chore: restructure examples - typescript-client and toolkits #1
Workflow file for this run
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: TypeScript | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| SOLANA_CLI_VERSION: "2.1.21" | |
| NODE_VERSION: "22" | |
| jobs: | |
| typescript-tests: | |
| name: TypeScript Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Cache Solana CLI tools | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/solana/ | |
| ~/.local/share/solana/ | |
| key: solana-cli-${{ runner.os }}-${{ env.SOLANA_CLI_VERSION }} | |
| - name: Install Solana CLI tools | |
| run: | | |
| sh -c "$(curl -sSfL https://release.anza.xyz/v${{ env.SOLANA_CLI_VERSION }}/install)" | |
| echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | |
| - name: Install Light CLI | |
| run: npm install -g @lightprotocol/zk-compression-cli@0.27.1-alpha.2 | |
| - name: Generate keypair | |
| run: solana-keygen new --no-bip39-passphrase | |
| - name: Install dependencies | |
| working-directory: typescript-client | |
| run: npm install | |
| - name: Switch to localnet | |
| working-directory: typescript-client | |
| run: | | |
| chmod +x switch-network.sh | |
| ./switch-network.sh localnet | |
| - name: Start test validator | |
| run: | | |
| light test-validator & | |
| sleep 15 | |
| - name: Run actions | |
| working-directory: typescript-client | |
| run: npm run test:actions | |
| - name: Run instructions | |
| working-directory: typescript-client | |
| run: npm run test:instructions |