build.yaml 753 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: Build
  2. on:
  3. push:
  4. branches: [master]
  5. pull_request:
  6. branches: [master]
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. - uses: actions/setup-node@v2
  13. with:
  14. node-version: '16.x'
  15. - uses: actions/cache@v2
  16. with:
  17. path: |
  18. ~/.npm
  19. ~/.config/yarn/global
  20. key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
  21. restore-keys: |
  22. ${{ runner.os }}-node-
  23. - name: Install Yarn
  24. run: |
  25. npm install -g yarn
  26. yarn install
  27. - name: Run ESLint
  28. run: yarn lint
  29. - name: Run Prettier
  30. run: yarn format:check
  31. - name: Build
  32. run: yarn build