Skip to content

Commit

Permalink
chore: add tests workflow for examples-web (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
npty authored Sep 15, 2023
1 parent 24f6a36 commit 82a22c5
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run GMP Example Tests
name: Verify Cli Examples

on: pull_request

Expand Down Expand Up @@ -41,6 +41,10 @@ jobs:
run: |
npm run build-aptos
- name: Override config/ci.json
run: |
echo '{"aptos": {"enabled": true}}' > config/ci.json
- name: Test
run: |
nohup sh -c "aptos node run-local-testnet --with-faucet" > nohup.out 2> nohup.err < /dev/null &
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/verify-web-examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Verify Web Examples

on: pull_request

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
arch: [amd64]
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Checkout code
uses: actions/checkout@v3

- name: Override config/ci.json
run: |
echo '{"aptos": {"enabled": false}}' > config/ci.json
- name: Install Dependencies for Cli Examples
run: npm ci

- name: Compile EVM Smart Contracts
run: |
npm run build
- name: Create .env file and Generate Chains Config
run: |
# Dummy private key created for testing purpose only, it is not secret
npm run setup
nohup npm run start &
sleep 5
- name: Setup Web Examples
run: |
cd examples-web
npm ci
npm run setup
- name: Compile EVM Smart Contracts and Deploy
run: |
cd examples-web
npm run deploy

0 comments on commit 82a22c5

Please sign in to comment.