1111 - feature/**
1212 - staging/**
1313jobs :
14- # unit-tests:
15- # runs-on: warp-ubuntu-latest-x64-16x
16- # timeout-minutes: 30
17- # steps:
18- # - name: Checkout repo
19- # uses: actions/checkout@v2
20- # with:
21- # fetch-depth: 0
22- # - name: Set up Node.js
23- # uses: actions/setup-node@v3
24- # with:
25- # node-version: '20'
26- # cache: 'yarn'
27- # - name: Install rust
28- 29- 30- # with:
31- # # Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
32- # version: 'latest'
33- # - name: Install project dependencies
34- # run: yarn --frozen-lockfile
35- # - uses: nrwl/nx-set-shas@v3
36- # with:
37- # main-branch-name: 'master'
38- # - name: Build
39- # run: yarn build:dev
40- # - name: Run Unit tests
41- # run: yarn tools --test --unit
14+ unit-tests :
15+ runs-on : warp-ubuntu-latest-x64-16x
16+ timeout-minutes : 30
17+ steps :
18+ - name : Checkout repo
19+ uses : actions/checkout@v2
20+ with :
21+ fetch-depth : 0
22+ - name : Set up Node.js
23+ uses : actions/setup-node@v3
24+ with :
25+ node-version : ' 20'
26+ cache : ' yarn'
27+ - name : Install rust
28+ 29+ 30+ with :
31+ # Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
32+ version : ' latest'
33+ - name : Install project dependencies
34+ run : yarn --frozen-lockfile
35+ - uses : nrwl/nx-set-shas@v3
36+ with :
37+ main-branch-name : ' master'
38+ - name : Build
39+ run : yarn build:dev
40+ - name : Run Unit tests
41+ run : yarn tools --test --unit
4242 integration-tests :
4343 runs-on : ubuntu-latest
4444 timeout-minutes : 30
4545 env :
46- DATIL_COMMIT_HASH : a2c9c8da092d65fa9a629c95ed05416cf4ef9738
46+ DATIL_COMMIT_HASH : 063a97d17044f084ba72ca57efc39138d155dca8
4747 steps :
4848 - name : Checkout repo
4949 uses : actions/checkout@v2
@@ -56,84 +56,84 @@ jobs:
5656 fetch-depth : 0
5757 repository : LIT-Protocol/lit-assets
5858 ref : ${{env.DATIL_COMMIT_HASH}}
59- token : ${{secrets.GH_PAT_FOR_SHIVA }}
59+ token : ${{secrets.GH_PAT }}
6060 path : ${{ github.workspace }}/lit-assets/
6161 submodules : false
6262 sparse-checkout : |
6363 blockchain
6464 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_FOR_SHIVA }}
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_FOR_SHIVA }} -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
110- # ping-lit-configuration-guides:
111- # runs-on: ubuntu-latest
112- # # needs: [unit-tests, integration-tests] # Make sure this job runs after others complete
113- # steps:
114- # - name: Get PR labels
115- # id: pr-labels
116- # uses: actions/github-script@v6
117- # if: github.event_name == 'pull_request'
118- # with:
119- # script: |
120- # const labels = context.payload.pull_request.labels
121- # .map(label => label.name)
122- # .filter(name => name.startsWith('tag:'))
123- # .map(name => name.split(':')[1]);
124- # if (labels.length > 0) {
125- # core.setOutput('tag', labels[0]);
126- # } else {
127- # core.setOutput('skip', 'true');
128- # }
129- # - name: Trigger dependencies bot in lit-configuration-guides
130- # if: steps.pr-labels.outputs.skip != 'true'
131- # run: |
132- # TAG="${{ steps.pr-labels.outputs.tag }}"
133- # curl -X POST \
134- # -H "Accept: application/vnd.github.everest-preview+json" \
135- # -H "Authorization: token ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}" \
136- # https://api.github.com/repos/LIT-Protocol/lit-configuration-guides/dispatches \
137- # -d "{\"event_type\":\"dependency_update\", \"client_payload\": {\"labels\": [\"$TAG\"]}}"
138- # env:
139- # GH_PAT_LIT_CONFIGURATION_GUIDES_REPO: ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}
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
110+ ping-lit-configuration-guides :
111+ runs-on : ubuntu-latest
112+ # needs: [unit-tests, integration-tests] # Make sure this job runs after others complete
113+ steps :
114+ - name : Get PR labels
115+ id : pr-labels
116+ uses : actions/github-script@v6
117+ if : github.event_name == 'pull_request'
118+ with :
119+ script : |
120+ const labels = context.payload.pull_request.labels
121+ .map(label => label.name)
122+ .filter(name => name.startsWith('tag:'))
123+ .map(name => name.split(':')[1]);
124+ if (labels.length > 0) {
125+ core.setOutput('tag', labels[0]);
126+ } else {
127+ core.setOutput('skip', 'true');
128+ }
129+ - name : Trigger dependencies bot in lit-configuration-guides
130+ if : steps.pr-labels.outputs.skip != 'true'
131+ run : |
132+ TAG="${{ steps.pr-labels.outputs.tag }}"
133+ curl -X POST \
134+ -H "Accept: application/vnd.github.everest-preview+json" \
135+ -H "Authorization: token ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}" \
136+ https://api.github.com/repos/LIT-Protocol/lit-configuration-guides/dispatches \
137+ -d "{\"event_type\":\"dependency_update\", \"client_payload\": {\"labels\": [\"$TAG\"]}}"
138+ env :
139+ GH_PAT_LIT_CONFIGURATION_GUIDES_REPO : ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}
0 commit comments