From df04b6ff99478a82fbe5861602eddedffb84d750 Mon Sep 17 00:00:00 2001 From: Anson Date: Fri, 25 Oct 2024 14:25:18 +0100 Subject: [PATCH] test(CI): test checkout LA --- .github/workflows/ci.yml | 206 +++++++++++++++++++-------------------- 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 874a8e68d..3f1e602d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,34 +11,34 @@ on: - feature/** - staging/** jobs: - unit-tests: - runs-on: warp-ubuntu-latest-x64-16x - timeout-minutes: 30 - steps: - - name: Checkout repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '20' - cache: 'yarn' - - name: Install rust - uses: dtolnay/rust-toolchain@1.76.0 - - uses: jetli/wasm-pack-action@v0.4.0 - with: - # Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest') - version: 'latest' - - name: Install project dependencies - run: yarn --frozen-lockfile - - uses: nrwl/nx-set-shas@v3 - with: - main-branch-name: 'master' - - name: Build - run: yarn build:dev - - name: Run Unit tests - run: yarn tools --test --unit + # unit-tests: + # runs-on: warp-ubuntu-latest-x64-16x + # timeout-minutes: 30 + # steps: + # - name: Checkout repo + # uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - name: Set up Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: '20' + # cache: 'yarn' + # - name: Install rust + # uses: dtolnay/rust-toolchain@1.76.0 + # - uses: jetli/wasm-pack-action@v0.4.0 + # with: + # # Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest') + # version: 'latest' + # - name: Install project dependencies + # run: yarn --frozen-lockfile + # - uses: nrwl/nx-set-shas@v3 + # with: + # main-branch-name: 'master' + # - name: Build + # run: yarn build:dev + # - name: Run Unit tests + # run: yarn tools --test --unit integration-tests: runs-on: ubuntu-latest timeout-minutes: 30 @@ -62,78 +62,78 @@ jobs: sparse-checkout: | blockchain rust/lit-node - - name: Check LA dir - run: ls -la ${{github.workspace}}/lit-assets - - name: Install LA Blockchain Dependencies - run: npm i - working-directory: ${{github.workspace}}/lit-assets/blockchain/contracts - - name: Docker login - id: login - run: docker login ghcr.io/ -u ${{secrets.GH_USER}} --password ${{secrets.GH_PAT_FOR_SHIVA}} - - name: Pull Shiva Container - id: shiva-pull - run: docker pull ghcr.io/lit-protocol/shiva:latest - - name: Run Shiva Container - id: shiva-runner - 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_FOR_SHIVA}} -e HASH=$DATIL_COMMIT_HASH -e IPFS_API_KEY=${{secrets.IPFS_API_KEY}} --name shiva ghcr.io/lit-protocol/shiva:latest - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '20' - - uses: jetli/wasm-pack-action@v0.4.0 - with: - # Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest') - version: 'latest' - - name: Install project dependencies - run: yarn --frozen-lockfile - - uses: nrwl/nx-set-shas@v3 - with: - main-branch-name: 'master' - - name: Build packages - id: build - run: yarn build:dev - - name: Copy ENV File - run: cp .env.ci .env - - name: Run End to End Tests - if: steps.build.outputs.exit_code == 0 - run: yarn test:local --filter=testUseEoaSessionSigsToExecuteJsSigning,testUseEoaSessionSigsToPkpSign,testUsePkpSessionSigsToExecuteJsSigning,testUsePkpSessionSigsToPkpSign,testUseValidLitActionCodeGeneratedSessionSigsToPkpSign,testUseValidLitActionCodeGeneratedSessionSigsToExecuteJsSigning,testDelegatingCapacityCreditsNFTToAnotherWalletToExecuteJs,testEthAuthSigToEncryptDecryptString,testExecuteJsSignAndCombineEcdsa,testExecutJsDecryptAndCombine,testExecuteJsBroadcastAndCollect --exclude=Parallel - - name: Get Container Logs - if: always() - run: docker logs shiva - - name: Post Pull Shiva Container - id: container-stop - if: steps.shiva-pull.outputs.exit_code == 0 - run: docker stop shiva && docker rm shiva - - name: Post Pull Shiva Image - if: steps.shiva-pull.outputs.exit_code == 0 - run: docker rmi ghcr.io/lit-protocol/shiva - ping-lit-configuration-guides: - runs-on: ubuntu-latest - # needs: [unit-tests, integration-tests] # Make sure this job runs after others complete - steps: - - name: Get PR labels - id: pr-labels - uses: actions/github-script@v6 - if: github.event_name == 'pull_request' - with: - script: | - const labels = context.payload.pull_request.labels - .map(label => label.name) - .filter(name => name.startsWith('tag:')) - .map(name => name.split(':')[1]); - if (labels.length > 0) { - core.setOutput('tag', labels[0]); - } else { - core.setOutput('skip', 'true'); - } - - name: Trigger dependencies bot in lit-configuration-guides - if: steps.pr-labels.outputs.skip != 'true' - run: | - TAG="${{ steps.pr-labels.outputs.tag }}" - curl -X POST \ - -H "Accept: application/vnd.github.everest-preview+json" \ - -H "Authorization: token ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}" \ - https://api.github.com/repos/LIT-Protocol/lit-configuration-guides/dispatches \ - -d "{\"event_type\":\"dependency_update\", \"client_payload\": {\"labels\": [\"$TAG\"]}}" - env: - GH_PAT_LIT_CONFIGURATION_GUIDES_REPO: ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }} + # - name: Check LA dir + # run: ls -la ${{github.workspace}}/lit-assets + # - name: Install LA Blockchain Dependencies + # run: npm i + # working-directory: ${{github.workspace}}/lit-assets/blockchain/contracts + # - name: Docker login + # id: login + # run: docker login ghcr.io/ -u ${{secrets.GH_USER}} --password ${{secrets.GH_PAT_FOR_SHIVA}} + # - name: Pull Shiva Container + # id: shiva-pull + # run: docker pull ghcr.io/lit-protocol/shiva:latest + # - name: Run Shiva Container + # id: shiva-runner + # 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_FOR_SHIVA}} -e HASH=$DATIL_COMMIT_HASH -e IPFS_API_KEY=${{secrets.IPFS_API_KEY}} --name shiva ghcr.io/lit-protocol/shiva:latest + # - name: Set up Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: '20' + # - uses: jetli/wasm-pack-action@v0.4.0 + # with: + # # Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest') + # version: 'latest' + # - name: Install project dependencies + # run: yarn --frozen-lockfile + # - uses: nrwl/nx-set-shas@v3 + # with: + # main-branch-name: 'master' + # - name: Build packages + # id: build + # run: yarn build:dev + # - name: Copy ENV File + # run: cp .env.ci .env + # - name: Run End to End Tests + # if: steps.build.outputs.exit_code == 0 + # run: yarn test:local --filter=testUseEoaSessionSigsToExecuteJsSigning,testUseEoaSessionSigsToPkpSign,testUsePkpSessionSigsToExecuteJsSigning,testUsePkpSessionSigsToPkpSign,testUseValidLitActionCodeGeneratedSessionSigsToPkpSign,testUseValidLitActionCodeGeneratedSessionSigsToExecuteJsSigning,testDelegatingCapacityCreditsNFTToAnotherWalletToExecuteJs,testEthAuthSigToEncryptDecryptString,testExecuteJsSignAndCombineEcdsa,testExecutJsDecryptAndCombine,testExecuteJsBroadcastAndCollect --exclude=Parallel + # - name: Get Container Logs + # if: always() + # run: docker logs shiva + # - name: Post Pull Shiva Container + # id: container-stop + # if: steps.shiva-pull.outputs.exit_code == 0 + # run: docker stop shiva && docker rm shiva + # - name: Post Pull Shiva Image + # if: steps.shiva-pull.outputs.exit_code == 0 + # run: docker rmi ghcr.io/lit-protocol/shiva + # ping-lit-configuration-guides: + # runs-on: ubuntu-latest + # # needs: [unit-tests, integration-tests] # Make sure this job runs after others complete + # steps: + # - name: Get PR labels + # id: pr-labels + # uses: actions/github-script@v6 + # if: github.event_name == 'pull_request' + # with: + # script: | + # const labels = context.payload.pull_request.labels + # .map(label => label.name) + # .filter(name => name.startsWith('tag:')) + # .map(name => name.split(':')[1]); + # if (labels.length > 0) { + # core.setOutput('tag', labels[0]); + # } else { + # core.setOutput('skip', 'true'); + # } + # - name: Trigger dependencies bot in lit-configuration-guides + # if: steps.pr-labels.outputs.skip != 'true' + # run: | + # TAG="${{ steps.pr-labels.outputs.tag }}" + # curl -X POST \ + # -H "Accept: application/vnd.github.everest-preview+json" \ + # -H "Authorization: token ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}" \ + # https://api.github.com/repos/LIT-Protocol/lit-configuration-guides/dispatches \ + # -d "{\"event_type\":\"dependency_update\", \"client_payload\": {\"labels\": [\"$TAG\"]}}" + # env: + # GH_PAT_LIT_CONFIGURATION_GUIDES_REPO: ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}