ci: change runner for e2e tests #2059
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
- staging/** | |
- feat/** | |
- feature/** | |
jobs: | |
e2e-connection: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
env: | |
NETWORK: localchain | |
DEBUG: true | |
MAX_ATTEMPTS: 3 | |
USE_SHIVA: true | |
STOP_TESTNET: true | |
TESTNET_MANAGER_URL: http://0.0.0.0:8000 | |
USE_LIT_BINARIES: true | |
LIT_NODE_BINARY_PATH: /usr/bin/lit_node | |
LIT_ACTION_BINARY_PATH: /usr/bin/lit_actions | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Checkout Lit Actions | |
uses: actions/checkout@v4 | |
id: checkout | |
with: | |
fetch-depth: 0 | |
repository: LIT-Protocol/lit-assets | |
token: ${{secrets.GH_PAT}} | |
path: ${{ github.workspace }}/lit-assets/ | |
submodules: false | |
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}} | |
- name: Pull Shiva Container | |
id: shiva-pull | |
run: docker pull ghcr.io/lit-protocol/shiva:latest | |
- name: Run Shiva Container | |
id: shiva-run | |
run: docker run -d -p 0.0.0.0: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="7a67a98c3648e0a4c38a210a084a5ca8bef577ae" -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: '18' | |
- name: Install project dependencies | |
run: yarn install | |
- name: Build packages | |
id: build | |
run: yarn build:dev | |
- name: Run End to End Tests | |
if: steps.build.outputs.exit_code == 0 | |
run: docker ps -a && 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 |