Skip to content

P-1111 Adding integration-tests in DA #91

P-1111 Adding integration-tests in DA

P-1111 Adding integration-tests in DA #91

Workflow file for this run

name: General CI
on:
push:
branches:
- dev
paths-ignore:
- '**/README.md'
pull_request:
branches:
- dev
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
set-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Node version
uses: actions/setup-node@v4
with:
node-version: 18
fmt:
runs-on: ubuntu-latest
needs:
- set-env
steps:
- uses: actions/checkout@v4
- name: Fmt check
run: |
corepack enable && corepack enable pnpm && pnpm install --frozen-lockfile
pnpm run check-format
contracts-uint-tests:
runs-on: ubuntu-latest
needs:
- set-env
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
npm install --save-dev hardhat
- name: Run contracts unit tests
run: |
npx hardhat test
- name: Run contracts unit tests
run: |
npx hardhat test
integration-tests:
runs-on: ubuntu-latest
needs:
- contracts-uint-tests
steps:
- uses: actions/checkout@v4
- name: Pull litentry image optionally
run: |
docker pull litentry/identity-worker:latest
docker pull litentry/identity-cli:latest
docker pull litentry/litentry-chain-aio:latest
- name: Create env file with secrets
run: |
mkdir -p /opt/worker_configs
echo "TWITTER_AUTH_TOKEN_V2=${{ secrets.TWITTER_AUTH_TOKEN_V2 }}" >> /opt/worker_configs/worker_env
echo "DISCORD_AUTH_TOKEN=${{ secrets.DISCORD_AUTH_TOKEN }}" >> /opt/worker_configs/worker_env
echo "ACHAINABLE_AUTH_KEY=${{ secrets.ACHAINABLE_AUTH_KEY }}" >> /opt/worker_configs/worker_env
echo "ONEBLOCK_NOTION_KEY=${{ secrets.ONEBLOCK_NOTION_KEY }}" >> /opt/worker_configs/worker_env
echo "NODEREAL_API_KEY=${{ secrets.NODEREAL_API_KEY }}" >> /opt/worker_configs/worker_env
echo "GENIIDATA_API_KEY=${{ secrets.GENIIDATA_API_KEY }}" >> /opt/worker_configs/worker_env
echo "MORALIS_API_KEY=${{ secrets.MORALIS_API_KEY }}" >> /opt/worker_configs/worker_env
echo "MAGIC_CRAFT_API_KEY=${{ secrets.MAGIC_CRAFT_API_KEY }}" >> /opt/worker_configs/worker_env
- name: Start parachain-worker
shell: bash
run: |
./scripts/run_parachain_worker.sh
docker ps
- name: Compile contracts
run: |
npm install --save-dev hardhat
npx hardhat compile
- name: Run integration tests
working-directory: ./vc-di-tests/integration-tests
run: |
corepack enable && corepack enable pnpm && pnpm install --no-frozen-lockfile
pnpm run test assertion_contracts.test.ts
- name: Stop docker
run: |
docker rm -f $(docker ps -aq)
- name: Upload docker logs if test fails
uses: actions/upload-artifact@v4
if: failure()
with:
name: integration-tests-docker-logs
path: docker-logs
if-no-files-found: ignore
retention-days: 3