build.yaml 923 B

123456789101112131415161718192021222324252627282930
  1. name: build
  2. on: [push, pull_request]
  3. jobs:
  4. run-test:
  5. runs-on: macOS-latest
  6. strategy:
  7. matrix:
  8. destination: ['macOS', 'iOS Simulator,name=iPhone 8', 'tvOS Simulator,name=Apple TV']
  9. swift-version: [5.0, 4.2, 4.0]
  10. steps:
  11. - uses: actions/checkout@v1
  12. - uses: actions/cache@v1
  13. id: bundler-cache
  14. with:
  15. path: vendor/bundle
  16. key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
  17. restore-keys: |
  18. ${{ runner.os }}-gems-
  19. - name: Bundle setup
  20. run: bundle config path vendor/bundle
  21. - name: Bundle install
  22. if: steps.bundler-cache.outputs.cache-hit != 'true'
  23. run: bundle install --jobs 4 --retry 3
  24. - name: Run tests
  25. env:
  26. DESTINATION: platform=${{ matrix.destination }}
  27. SWIFT_VERSION: ${{ matrix.swift-version }}
  28. run: bundle exec fastlane test_ci