ci.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: "CI"
  2. env:
  3. DOTENV_CONFIG_PATH: "./.env.example"
  4. on:
  5. workflow_dispatch:
  6. pull_request:
  7. push:
  8. branches:
  9. - main
  10. jobs:
  11. ci:
  12. runs-on: "ubuntu-latest"
  13. steps:
  14. - name: "Check out the repo"
  15. uses: "actions/checkout@v3"
  16. - name: "Install Pnpm"
  17. uses: "pnpm/action-setup@v2"
  18. with:
  19. version: "8"
  20. - name: "Install Node.js"
  21. uses: "actions/setup-node@v3"
  22. with:
  23. cache: "pnpm"
  24. node-version: "lts/*"
  25. - name: "Install the dependencies"
  26. run: "pnpm install"
  27. - name: "Lint the code"
  28. run: "pnpm lint"
  29. - name: "Add lint summary"
  30. run: |
  31. echo "## Lint results" >> $GITHUB_STEP_SUMMARY
  32. echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
  33. - name: "Compile the contracts and generate the TypeChain bindings"
  34. run: "pnpm typechain"
  35. - name: "Test the contracts and generate the coverage report"
  36. run: "pnpm coverage"
  37. - name: "Add test summary"
  38. run: |
  39. echo "## Test results" >> $GITHUB_STEP_SUMMARY
  40. echo "✅ Passed" >> $GITHUB_STEP_SUMMARY