暫無描述

ci.yml 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: CI
  2. on: [push, pull_request]
  3. jobs:
  4. js-tests:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v1
  8. - name: Use Node.js 12.x
  9. uses: actions/setup-node@v1
  10. with:
  11. node-version: 12.x
  12. - name: Install yarn
  13. run: npm install -g yarn
  14. - name: Get yarn cache
  15. id: yarn-cache
  16. run: echo "::set-output name=dir::$(yarn cache dir)"
  17. - uses: actions/cache@v1
  18. with:
  19. path: ${{ steps.yarn-cache.outputs.dir }}
  20. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  21. restore-keys: |
  22. ${{ runner.os }}-yarn-
  23. - name: Install dependencies
  24. run: yarn install
  25. - name: Run tests
  26. run: yarn test
  27. android-build:
  28. runs-on: ubuntu-latest
  29. steps:
  30. - uses: actions/checkout@v1
  31. - name: Use Node.js 12.x
  32. uses: actions/setup-node@v1
  33. with:
  34. node-version: 12.x
  35. - name: Install yarn
  36. run: npm install -g yarn
  37. - name: Get yarn cache
  38. id: yarn-cache
  39. run: echo "::set-output name=dir::$(yarn cache dir)"
  40. - uses: actions/cache@v1
  41. with:
  42. path: ${{ steps.yarn-cache.outputs.dir }}
  43. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  44. restore-keys: |
  45. ${{ runner.os }}-yarn-
  46. - name: Install dependencies
  47. run: yarn install
  48. - name: Build android example app
  49. run: cd example/android && ./gradlew assembleDebug
  50. ios-build:
  51. runs-on: macOS-latest
  52. steps:
  53. - uses: actions/checkout@v1
  54. - name: Use Node.js 12.x
  55. uses: actions/setup-node@v1
  56. with:
  57. node-version: 12.x
  58. - uses: actions/setup-ruby@v1
  59. with:
  60. ruby-version: '2.x'
  61. - name: Install cocoapods
  62. run: gem install cocoapods
  63. - name: Install yarn
  64. run: npm install -g yarn
  65. - name: Get yarn cache
  66. id: yarn-cache
  67. run: echo "::set-output name=dir::$(yarn cache dir)"
  68. - uses: actions/cache@v1
  69. with:
  70. path: ${{ steps.yarn-cache.outputs.dir }}
  71. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  72. restore-keys: |
  73. ${{ runner.os }}-yarn-
  74. - name: Install dependencies
  75. run: yarn install
  76. - name: Install pods
  77. run: cd example/ios && pod install
  78. - name: Build ios example app
  79. run: cd example/ios && xcodebuild -scheme SafeAreaViewExample -workspace SafeAreaViewExample.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug