lint.yml 949 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: Lint
  2. on:
  3. push:
  4. branches:
  5. - main
  6. tags-ignore:
  7. - '**'
  8. pull_request:
  9. jobs:
  10. lint:
  11. name: Lint
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v3
  15. - name: Setup node
  16. uses: actions/setup-node@v3
  17. with:
  18. node-version: 16
  19. cache: 'yarn'
  20. check-latest: true
  21. - name: Install
  22. uses: actions-rs/toolchain@v1
  23. with:
  24. toolchain: stable
  25. profile: minimal
  26. override: true
  27. components: rustfmt, clippy
  28. - name: Cache NPM dependencies
  29. uses: actions/cache@v3
  30. with:
  31. path: node_modules
  32. key: npm-cache-lint-node@16
  33. - name: Install dependencies
  34. run: yarn install --immutable --network-timeout 300000
  35. - name: ESLint
  36. run: yarn lint
  37. - name: Cargo fmt
  38. run: cargo fmt -- --check
  39. - name: Clippy
  40. run: cargo clippy