|
34 | 34 | - basic-operations/anchor/update |
35 | 35 | - basic-operations/anchor/close |
36 | 36 | - basic-operations/anchor/reinit |
| 37 | + - zk/zk-id |
| 38 | + - zk/nullifier |
37 | 39 | steps: |
38 | 40 | - uses: actions/checkout@v4 |
39 | 41 |
|
|
45 | 47 | solana-cli-version: ${{ env.SOLANA_CLI_VERSION }} |
46 | 48 | rust-toolchain: ${{ env.RUST_TOOLCHAIN }} |
47 | 49 | photon-indexer: "true" |
| 50 | + install-circom: ${{ matrix.example == 'zk/zk-id' }} |
| 51 | + |
| 52 | + - name: Setup ZK circuits |
| 53 | + if: matrix.example == 'zk/zk-id' |
| 54 | + working-directory: ${{ matrix.example }} |
| 55 | + run: ./scripts/setup.sh |
48 | 56 |
|
49 | 57 | - name: Install dependencies |
50 | 58 | working-directory: ${{ matrix.example }} |
|
69 | 77 | - name: Run TypeScript tests |
70 | 78 | working-directory: ${{ matrix.example }} |
71 | 79 | run: anchor test --skip-local-validator --skip-build --skip-deploy |
72 | | - |
73 | | - test-zk: |
74 | | - name: ZK ${{ matrix.example }} |
75 | | - runs-on: ubuntu-latest |
76 | | - strategy: |
77 | | - fail-fast: false |
78 | | - matrix: |
79 | | - example: |
80 | | - - zk/zk-id |
81 | | - - zk/zk-nullifier |
82 | | - steps: |
83 | | - - uses: actions/checkout@v4 |
84 | | - |
85 | | - - name: Setup environment |
86 | | - uses: ./.github/actions/setup |
87 | | - with: |
88 | | - example: ${{ matrix.example }} |
89 | | - node-version: ${{ env.NODE_VERSION }} |
90 | | - solana-cli-version: ${{ env.SOLANA_CLI_VERSION }} |
91 | | - rust-toolchain: ${{ env.RUST_TOOLCHAIN }} |
92 | | - photon-indexer: "true" |
93 | | - install-circom: "true" |
94 | | - |
95 | | - - name: Setup ZK circuits |
96 | | - working-directory: ${{ matrix.example }} |
97 | | - run: ./scripts/setup.sh |
98 | | - |
99 | | - - name: Install dependencies |
100 | | - working-directory: ${{ matrix.example }} |
101 | | - run: npm install |
102 | | - |
103 | | - - name: Build program |
104 | | - working-directory: ${{ matrix.example }} |
105 | | - run: cargo build-sbf |
106 | | - |
107 | | - - name: Start test validator |
108 | | - working-directory: ${{ matrix.example }} |
109 | | - run: | |
110 | | - PROGRAM_NAME=$(grep -A 10 '\[programs.localnet\]' Anchor.toml | grep '=' | head -1 | cut -d' ' -f1) |
111 | | - PROGRAM_ID=$(grep -A 10 '\[programs.localnet\]' Anchor.toml | grep '=' | head -1 | sed 's/.*"\(.*\)".*/\1/') |
112 | | - light test-validator --sbf-program "$PROGRAM_ID" ./target/deploy/${PROGRAM_NAME}.so & |
113 | | - sleep 10 |
114 | | -
|
115 | | - - name: Run TypeScript tests |
116 | | - working-directory: ${{ matrix.example }} |
117 | | - run: npm run test:ts |
0 commit comments