ci.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 Node.js"
  17. uses: "actions/setup-node@v3"
  18. with:
  19. cache: "yarn"
  20. node-version: "lts/*"
  21. - name: "Install the dependencies"
  22. run: "yarn install --immutable"
  23. - name: "Lint the code"
  24. run: "yarn lint"
  25. - name: "Add lint summary"
  26. run: |
  27. echo "## Lint results" >> $GITHUB_STEP_SUMMARY
  28. echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
  29. - name: "Compile the contracts and generate the TypeChain bindings"
  30. run: "yarn typechain"
  31. - name: "Test the contracts and generate the coverage report"
  32. run: "yarn coverage"
  33. - name: "Add test summary"
  34. run: |
  35. echo "## Test results" >> $GITHUB_STEP_SUMMARY
  36. echo "✅ Passed" >> $GITHUB_STEP_SUMMARY