Add complere testnet contracts #140
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: Ethereum Smart Contract | |
on: | |
push: | |
paths: | |
- 'smart-contract/**' | |
- '.github/**' | |
jobs: | |
ethereum-gateway-smart-contract-test: | |
name: Build and test the ethereum smart-contract code on ${{ matrix.node }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: ['20.x'] | |
os: [ubuntu-latest] | |
defaults: | |
run: | |
working-directory: ./smart-contract | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Use Node ${{ matrix.node }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache node dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./node_modules | |
key: yarn-ethereum-${{ hashFiles('yarn.lock') }} | |
- name: NPM login | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | |
- name: Install | |
run: yarn | |
- name: Build | |
env: | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
INFURA_KEY: ${{ secrets.INFURA_KEY }} | |
run: yarn build | |
- name: Test | |
env: | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
INFURA_KEY: ${{ secrets.INFURA_KEY }} | |
run: yarn coverage |