No Description

windows-ci.yml 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: Windows CI
  2. on: [pull_request]
  3. jobs:
  4. run-windows-tests:
  5. name: Build & run tests
  6. runs-on: windows-2019
  7. steps:
  8. - uses: actions/checkout@v2
  9. name: Checkout Code
  10. - name: Setup Node.js
  11. uses: actions/setup-node@v1
  12. with:
  13. node-version: '12.9.1'
  14. - name: Setup MSBuild
  15. uses: microsoft/setup-msbuild@v1.0.0
  16. with:
  17. vs-version: 16.5
  18. - name: Check node modules cache
  19. uses: actions/cache@v1
  20. id: yarn-cache
  21. with:
  22. path: ./node_modules
  23. key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
  24. restore-keys: |
  25. ${{ runner.os }}-yarn-
  26. - name: Install node modules
  27. if: steps.yarn-cache.outputs.cache-hit != 'true'
  28. run: yarn --pure-lockfile
  29. - name: yarn build
  30. if: steps.yarn-cache.outputs.cache-hit == 'true'
  31. run: |
  32. yarn build
  33. yarn tsc
  34. - name: Build x64 release
  35. shell: powershell
  36. run: npx react-native run-windows --root example --arch x64 --release --no-packager --no-deploy --logging
  37. # Workaround for a bug in package searching during deploy.
  38. # The deploy script only searches windows/{*/bin/x64/Release,Release/*}, but the build step above placed the pakcages at windows/x64/Release.
  39. # Copy the packages to Windows/Release before deploying.
  40. - name: Deploy
  41. shell: powershell
  42. run: |
  43. cd example
  44. Copy-Item -Path windows\x64\Release -Recurse -Destination windows\
  45. npx react-native run-windows --arch x64 --release --no-build --no-packager
  46. - name: Start Appium server
  47. shell: powershell
  48. run: Start-Process PowerShell -ArgumentList "yarn appium"
  49. - name: Run tests
  50. run: yarn test:windows