Skip to content

Commit

Permalink
ci: few nits
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Nov 8, 2023
1 parent 537558e commit 606e588
Showing 1 changed file with 19 additions and 25 deletions.
44 changes: 19 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,16 @@ jobs:
node-version: '16.17.1'

- name: Install npm dependencies
run: |
cd matic-cli
npm install --prefer-offline --no-audit --progress=false
working-directory: matic-cli
run: npm install --prefer-offline --no-audit --progress=false

- name: Run prettier
run: |
cd matic-cli
npm run prettier:check
working-directory: matic-cli
run: npm run prettier:check

- name: Run lint
run: |
cd matic-cli
npm run lint:check
working-directory: matic-cli
run: npm run lint:check

integration-tests:
permissions:
Expand All @@ -57,8 +54,8 @@ jobs:
path: matic-cli

- name: Create .env file
working-directory: matic-cli
run: |
cd matic-cli
cp .env.example .env
sed -i 's,YOUR_IDENTIFIER,matic-cli-ci,' .env
sed -i 's,aws-key,matic-cli-ci-key,' .env
Expand All @@ -70,8 +67,8 @@ jobs:
uses: haythem/[email protected]

- name: Create secret.tfvars
working-directory: matic-cli
run: |
cd matic-cli
touch secret.tfvars
echo "SG_CIDR_BLOCKS=[\"${{ steps.ip.outputs.ipv4 }}/32\"]" >> secret.tfvars
Expand All @@ -83,8 +80,8 @@ jobs:
role-session-name: GithubActionsSession

- name: Create aws key pair
working-directory: matic-cli
run: |
cd matic-cli
mkdir aws
cd aws
aws ec2 create-key-pair --key-name matic-cli-ci-key --key-type rsa --key-format pem --query "KeyMaterial" --output text > matic-cli-ci-key.pem
Expand All @@ -96,44 +93,41 @@ jobs:
node-version: '16.17.1'

- name: Install npm dependencies
run: |
cd matic-cli
npm install --prefer-offline --no-audit --progress=false
working-directory: matic-cli
run: npm install --prefer-offline --no-audit --progress=false

- name: Init devnet
run: |
cd matic-cli
./bin/express-cli --init aws
working-directory: matic-cli
run: ./bin/express-cli --init aws

- name: Start devnet
working-directory: matic-cli/deployments/devnet-1
run: |
cd matic-cli/deployments/devnet-1
ls -la
../../bin/express-cli --start
- name: Run stateSynced and checkpoint tests
working-directory: matic-cli/deployments/devnet-1
run: |
cd matic-cli/deployments/devnet-1
../../bin/express-cli --send-state-sync
timeout 20m ../../bin/express-cli --monitor exit
- name: Run smart contracts events tests
working-directory: matic-cli/deployments/devnet-1
run: |
cd matic-cli/deployments/devnet-1
timeout 5m ../../bin/express-cli --send-staked-event 1
timeout 5m ../../bin/express-cli --send-stakeupdate-event 1
timeout 5m ../../bin/express-cli --send-topupfee-event 1
timeout 10m ../../bin/express-cli --send-unstakeinit-event 1
- name: Destroy devnet
if: always()
working-directory: matic-cli/deployments/devnet-1
run: |
cd matic-cli/deployments/devnet-1
echo "Running --destroy"
../../bin/express-cli --destroy
- name: Delete aws key pair
if: always()
run: |
cd matic-cli/aws
aws ec2 delete-key-pair --key-name matic-cli-ci-key
working-directory: matic-cli/aws
run: aws ec2 delete-key-pair --key-name matic-cli-ci-key

0 comments on commit 606e588

Please sign in to comment.