|
| 1 | +name: Build |
| 2 | +on: pull_request |
| 3 | + |
| 4 | +jobs: |
| 5 | + lint: |
| 6 | + runs-on: ubuntu-18.04 |
| 7 | + strategy: |
| 8 | + matrix: |
| 9 | + node-version: [10] |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v2 |
| 12 | + - uses: actions/setup-node@v1 |
| 13 | + with: |
| 14 | + node-version: ${{ matrix.node-version }} |
| 15 | + - name: Get yarn cache |
| 16 | + id: yarn-cache |
| 17 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 18 | + - uses: actions/cache@v2 |
| 19 | + with: |
| 20 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 21 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 22 | + - name: Install Dependencies |
| 23 | + run: yarn |
| 24 | + - name: ESLint Checks |
| 25 | + run: yarn lint |
| 26 | + flow: |
| 27 | + runs-on: ubuntu-18.04 |
| 28 | + strategy: |
| 29 | + matrix: |
| 30 | + node-version: [10] |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v2 |
| 33 | + - uses: actions/setup-node@v1 |
| 34 | + with: |
| 35 | + node-version: ${{ matrix.node-version }} |
| 36 | + - name: Get yarn cache |
| 37 | + id: yarn-cache |
| 38 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 39 | + - uses: actions/cache@v2 |
| 40 | + with: |
| 41 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 42 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 43 | + - name: Install Dependencies |
| 44 | + run: yarn |
| 45 | + - name: FlowType Check |
| 46 | + run: yarn flow |
| 47 | + tsc: |
| 48 | + runs-on: ubuntu-18.04 |
| 49 | + strategy: |
| 50 | + matrix: |
| 51 | + node-version: [10] |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v2 |
| 54 | + - uses: actions/setup-node@v1 |
| 55 | + with: |
| 56 | + node-version: ${{ matrix.node-version }} |
| 57 | + - name: Get yarn cache |
| 58 | + id: yarn-cache |
| 59 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 60 | + - uses: actions/cache@v2 |
| 61 | + with: |
| 62 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 63 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 64 | + - name: Install Dependencies |
| 65 | + run: yarn |
| 66 | + - name: TypeScript type check |
| 67 | + run: yarn type-check |
| 68 | + android: |
| 69 | + runs-on: ubuntu-18.04 |
| 70 | + strategy: |
| 71 | + matrix: |
| 72 | + node-version: [10] |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v2 |
| 75 | + - uses: actions/setup-node@v1 |
| 76 | + with: |
| 77 | + node-version: ${{ matrix.node-version }} |
| 78 | + - name: Get yarn cache |
| 79 | + id: yarn-cache |
| 80 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 81 | + - uses: actions/cache@v2 |
| 82 | + with: |
| 83 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 84 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 85 | + - name: Install Dependencies |
| 86 | + run: yarn |
| 87 | + - name: Build Android Example App and Library |
| 88 | + run: cd example/android && ./gradlew clean assembleDebug |
| 89 | + ios: |
| 90 | + runs-on: macos-latest |
| 91 | + strategy: |
| 92 | + matrix: |
| 93 | + node-version: [10] |
| 94 | + steps: |
| 95 | + - uses: actions/checkout@v2 |
| 96 | + - uses: actions/setup-node@v1 |
| 97 | + with: |
| 98 | + node-version: ${{ matrix.node-version }} |
| 99 | + - name: Get yarn cache |
| 100 | + id: yarn-cache |
| 101 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 102 | + - uses: actions/cache@v2 |
| 103 | + with: |
| 104 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 105 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 106 | + - name: Install Dependencies |
| 107 | + run: yarn |
| 108 | + - name: Install Podfiles |
| 109 | + run: cd example && npx pod-install |
| 110 | + - name: Build example app |
| 111 | + run: yarn ios |
0 commit comments