lint.yaml 972 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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@v2
  15. - name: Setup node
  16. uses: actions/setup-node@v1
  17. with:
  18. node-version: 14
  19. - name: Install
  20. uses: actions-rs/toolchain@v1
  21. with:
  22. toolchain: stable
  23. profile: minimal
  24. override: true
  25. components: rustfmt, clippy
  26. - name: Cache NPM dependencies
  27. uses: actions/cache@v1
  28. with:
  29. path: node_modules
  30. key: npm-cache-lint-node@14-${{ hashFiles('yarn.lock') }}
  31. - name: 'Install dependencies'
  32. run: yarn install --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
  33. - name: ESLint
  34. run: yarn lint
  35. - name: Cargo fmt
  36. run: cargo fmt -- --check
  37. - name: Clippy
  38. run: cargo clippy