name: Ensuro SmartContract Tests
on: [push]

jobs:
  tests:
    name: Ensuro Tests
    runs-on: ubuntu-latest
    container:
      image: gnarvaja/eth-dev:ensuro-1.0.6
    timeout-minutes: 30

    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - run: npm install
      - run: npx hardhat compile
      - run: npx hardhat size-contracts
      - run: npm run solhint
      - run: brownie test -v --gas
      - run: ./deploySmokeTest.sh
      - run: ./deploySmokeTest-fork.sh
        env:
          ALCHEMY_URL: ${{ secrets.ALCHEMY_URL }}
      - run: npx hardhat test
        env:
          ALCHEMY_URL: ${{ secrets.ALCHEMY_URL }}
