ci.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Continuous Integration
  2. on: [push]
  3. jobs:
  4. tests:
  5. runs-on: ubuntu-latest
  6. environment: sauce
  7. permissions: read-all
  8. env:
  9. SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
  10. SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
  11. SAUCE_TUNNEL_ID: github-action-tunnel
  12. steps:
  13. - name: Setup sauce connect
  14. uses: saucelabs/sauce-connect-action@v2
  15. with:
  16. username: ${{ secrets.SAUCE_USERNAME }}
  17. accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
  18. tunnelIdentifier: github-action-tunnel
  19. scVersion: 4.7.1
  20. - name: Checkout
  21. uses: actions/checkout@v2
  22. - uses: actions/setup-node@v2
  23. with:
  24. node-version: 16
  25. - name: Cache dependencies
  26. uses: actions/cache@v2
  27. with:
  28. path: ~/.npm
  29. key: npm-${{ hashFiles('package-lock.json') }}
  30. restore-keys: npm-
  31. - name: Install packages
  32. run: npm ci
  33. - name: Lint code
  34. run: npm run lint
  35. - name: Run browser tests in Saucelabs
  36. run: npm run test-ci
  37. timeout-minutes: 5