ci.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: "CI"
  2. on:
  3. pull_request:
  4. branches:
  5. - "main"
  6. push:
  7. branches:
  8. - "main"
  9. jobs:
  10. ci:
  11. runs-on: "ubuntu-latest"
  12. steps:
  13. - name: "Check out the repo"
  14. uses: "actions/checkout@v3"
  15. - name: "Install Node.js"
  16. uses: "actions/setup-node@v3"
  17. with:
  18. cache: "yarn"
  19. node-version: "16"
  20. # Inject all environment variables from ".env.example" in $GITHUB_ENV
  21. - name: "Set dotenv"
  22. uses: "c-py/action-dotenv-to-setenv@v2"
  23. with:
  24. env-file: ".env.example"
  25. - name: "Install the dependencies"
  26. run: "yarn install --immutable"
  27. - name: "Lint the code"
  28. run: "yarn 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: "yarn typechain"
  35. - name: "Test the contracts and generate the coverage report"
  36. run: "yarn coverage"
  37. - name: "Add test summary"
  38. run: |
  39. echo "## Test results" >> $GITHUB_STEP_SUMMARY
  40. echo "✅ Passed" >> $GITHUB_STEP_SUMMARY