|
39 | 39 | run: yarn build:dev |
40 | 40 | - name: Run Unit tests |
41 | 41 | run: yarn tools --test --unit |
| 42 | + datil-integration-tests: |
| 43 | + runs-on: ubuntu-latest |
| 44 | + timeout-minutes: 30 |
| 45 | + env: |
| 46 | + DATIL_COMMIT_HASH: ae3c20e07eb933b61073689b95f56867c03de252 |
| 47 | + steps: |
| 48 | + - name: Checkout repo |
| 49 | + uses: actions/checkout@v2 |
| 50 | + with: |
| 51 | + fetch-depth: 0 |
| 52 | + - name: Checkout Lit Actions |
| 53 | + uses: actions/checkout@v4 |
| 54 | + id: checkout |
| 55 | + with: |
| 56 | + fetch-depth: 0 |
| 57 | + repository: LIT-Protocol/lit-assets |
| 58 | + ref: ${{env.DATIL_COMMIT_HASH}} |
| 59 | + token: ${{secrets.GH_PAT}} |
| 60 | + path: ${{ github.workspace }}/lit-assets/ |
| 61 | + submodules: false |
| 62 | + sparse-checkout: | |
| 63 | + blockchain |
| 64 | + rust/lit-node |
| 65 | + - name: Check LA dir |
| 66 | + run: ls -la ${{github.workspace}}/lit-assets |
| 67 | + - name: Install LA Blockchain Dependencies |
| 68 | + run: npm i |
| 69 | + working-directory: ${{github.workspace}}/lit-assets/blockchain/contracts |
| 70 | + - name: Docker login |
| 71 | + id: login |
| 72 | + run: docker login ghcr.io/ -u ${{secrets.GH_USER}} --password ${{secrets.GH_PAT}} |
| 73 | + - name: Pull Shiva Container |
| 74 | + id: shiva-pull |
| 75 | + run: docker pull ghcr.io/lit-protocol/shiva:latest |
| 76 | + - name: Run Shiva Container |
| 77 | + id: shiva-runner |
| 78 | + run: docker run -d -m 32g -p 8000:8000 -p 8545:8545 -p 7470:7470 -p 7471:7471 -p 7472:7472 -p 7473:7473 -p 7474:7474 -p 7475:7475 -v ${{github.workspace}}/lit-assets:/data -e GH_PAT=${{secrets.GH_PAT}} -e HASH=$DATIL_COMMIT_HASH -e IPFS_API_KEY=${{secrets.IPFS_API_KEY}} --name shiva ghcr.io/lit-protocol/shiva:latest |
| 79 | + - name: Set up Node.js |
| 80 | + uses: actions/setup-node@v3 |
| 81 | + with: |
| 82 | + node-version: '20' |
| 83 | + |
| 84 | + with: |
| 85 | + # Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest') |
| 86 | + version: 'latest' |
| 87 | + - name: Install project dependencies |
| 88 | + run: yarn --frozen-lockfile |
| 89 | + - uses: nrwl/nx-set-shas@v3 |
| 90 | + with: |
| 91 | + main-branch-name: 'master' |
| 92 | + - name: Build packages |
| 93 | + id: build |
| 94 | + run: yarn build:dev |
| 95 | + - name: Copy ENV File |
| 96 | + run: cp .env.ci .env |
| 97 | + - name: Run End to End Tests |
| 98 | + if: steps.build.outputs.exit_code == 0 |
| 99 | + run: yarn test:local --filter=testUseEoaSessionSigsToExecuteJsSigning,testUseEoaSessionSigsToPkpSign,testUsePkpSessionSigsToExecuteJsSigning,testUsePkpSessionSigsToPkpSign,testUseValidLitActionCodeGeneratedSessionSigsToPkpSign,testUseValidLitActionCodeGeneratedSessionSigsToExecuteJsSigning,testDelegatingCapacityCreditsNFTToAnotherWalletToExecuteJs,testEthAuthSigToEncryptDecryptString,testExecuteJsSignAndCombineEcdsa,testExecutJsDecryptAndCombine,testExecuteJsBroadcastAndCollect --exclude=Parallel |
| 100 | + - name: Get Container Logs |
| 101 | + if: always() |
| 102 | + run: docker logs shiva |
| 103 | + - name: Post Pull Shiva Container |
| 104 | + id: container-stop |
| 105 | + if: steps.shiva-pull.outputs.exit_code == 0 |
| 106 | + run: docker stop shiva && docker rm shiva |
| 107 | + - name: Post Pull Shiva Image |
| 108 | + if: steps.shiva-pull.outputs.exit_code == 0 |
| 109 | + run: docker rmi ghcr.io/lit-protocol/shiva |
42 | 110 | naga-integration-tests: |
43 | 111 | runs-on: ubuntu-latest |
44 | 112 | timeout-minutes: 30 |
|
0 commit comments