-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 |