P-976 replicate contracts tests infrastructure for idhub #39
Workflow file for this run
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: 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: Install deps | |
run: | | |
corepack enable && corepack enable pnpm && pnpm install --frozen-lockfile | |
- name: Fmt check | |
run: | | |
pnpm run check-format | |
contracts-uint-tests: | |
runs-on: ubuntu-latest | |
needs: | |
- set-env | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run contracts unit tests | |
run: | | |
npm install --save-dev hardhat | |
npx hardhat test | |
integration-tests: | |
runs-on: ubuntu-latest | |
needs: | |
- set-env | |
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 | |
- run: docker images --all | |
- 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 | |
shell: bash | |
- name: Start parachain | |
run: | | |
./scripts/run_parachain_worker.sh | |
docker ps | |
- 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 |