end-to-end.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: End-to-end tests
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request_target:
  6. # We want all branches so we configure types to be the GH default again
  7. types: [ opened, synchronize, reopened ]
  8. jobs:
  9. e2e:
  10. name: Browser tests
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout sources
  14. uses: actions/checkout@v2
  15. with:
  16. # Necessary for yarn version plugin
  17. # https://yarnpkg.com/features/release-workflow#commit-history
  18. fetch-depth: 0
  19. - name: Get yarn cache directory path
  20. id: yarn-cache-dir-path
  21. run: echo "::set-output name=dir::$(corepack yarn config get cacheFolder)"
  22. - uses: actions/cache@v2
  23. id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
  24. with:
  25. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  26. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  27. restore-keys: |
  28. ${{ runner.os }}-yarn-
  29. - name: Install Node.js
  30. uses: actions/setup-node@v2
  31. with:
  32. node-version: 16.x
  33. - name: Install dependencies
  34. run: corepack yarn install --immutable
  35. - name: Build Uppy packages
  36. run: corepack yarn build
  37. - name: Run end-to-end browser tests
  38. run: corepack yarn run e2e:ci
  39. env:
  40. COMPANION_UNSPLASH_KEY: ${{secrets.COMPANION_UNSPLASH_KEY}}
  41. COMPANION_UNSPLASH_SECRET: ${{secrets.COMPANION_UNSPLASH_SECRET}}
  42. VITE_TRANSLOADIT_KEY: ${{secrets.TRANSLOADIT_KEY}}
  43. VITE_TRANSLOADIT_TEMPLATE: ${{secrets.TRANSLOADIT_TEMPLATE}}
  44. VITE_TRANSLOADIT_SERVICE_URL: ${{secrets.TRANSLOADIT_SERVICE_URL}}