xref: /expo/.github/workflows/home.yml (revision dfd15ebd)
1name: Home app
2
3on:
4  workflow_dispatch: {}
5  pull_request:
6    paths:
7      - .github/workflows/home.yml
8      - home/**
9      - yarn.lock
10  push:
11    branches: [main, 'sdk-*']
12    paths:
13      - .github/workflows/home.yml
14      - home/**
15      - yarn.lock
16
17concurrency:
18  group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
19  cancel-in-progress: true
20
21jobs:
22  build:
23    runs-on: ubuntu-20.04
24    steps:
25      - name: �� Checkout
26        uses: actions/checkout@v3
27        with:
28          submodules: true
29      - name: ⬢ Setup Node
30        uses: actions/setup-node@v3
31        with:
32          node-version: '14.17'
33      - name: ♻️ Restore caches
34        uses: ./.github/actions/expo-caches
35        id: expo-caches
36        with:
37          yarn-workspace: 'true'
38      - name: �� Yarn install
39        if: steps.expo-caches.outputs.yarn-workspace-hit != 'true'
40        run: yarn install --frozen-lockfile
41      - name: �� Compile Home sources
42        run: yarn tsc
43        working-directory: home
44      - name: �� Run Home tests
45        run: yarn jest --maxWorkers 1
46        working-directory: home
47      - name: �� Lint Home app
48        run: yarn lint --max-warnings 0
49        working-directory: home
50      - name: �� Notify on Slack
51        uses: 8398a7/action-slack@v3
52        if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-'))
53        env:
54          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55          SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_api }}
56        with:
57          channel: '#expo-sdk'
58          status: ${{ job.status }}
59          fields: job,message,ref,eventName,author,took
60          author_name: Home app
61
62  # publish-dogfood-home:
63  #   if: github.event_name == 'push' && github.ref == 'refs/heads/main'
64  #   needs: build
65  #   runs-on: ubuntu-20.04
66  #   steps:
67  #     - name: �� Checkout
68  #       uses: actions/checkout@v3
69  #       with:
70  #         submodules: true
71  #     - name: ⬢ Setup Node
72  #       uses: actions/setup-node@v3
73  #       with:
74  #         node-version: '14.17'
75  #     - name: ♻️ Restore caches
76  #       uses: ./.github/actions/expo-caches
77  #       id: expo-caches
78  #       with:
79  #         yarn-tools: 'true'
80  #     - name: �� Yarn install /tools
81  #       if: steps.expo-caches.outputs.yarn-tools-hit != 'true'
82  #       run: yarn install --frozen-lockfile
83  #       working-directory: tools
84  #     - name: �� Install Expo CLI
85  #       run: yarn global add expo-cli
86  #     - name: �� Publish dogfood Home
87  #       run: bin/expotools publish-dogfood-home
88  #       env:
89  #         EXPO_DOGFOOD_HOME_ACCESS_TOKEN: ${{ secrets.EXPO_DOGFOOD_HOME_ACCESS_TOKEN }}
90  #     - name: �� Notify on Slack
91  #       uses: 8398a7/action-slack@v3
92  #       if: failure()
93  #       env:
94  #         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95  #         SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_api }}
96  #       with:
97  #         channel: '#expo-sdk'
98  #         status: ${{ job.status }}
99  #         fields: job,message,ref,eventName,author,took
100  #         author_name: Home app
101