|
| 1 | +name: build |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + tags: |
| 7 | + - '!*' # Do not execute on tags |
| 8 | + paths: |
| 9 | + - src/* |
| 10 | + - test/* |
| 11 | + - __tests__/* |
| 12 | + - '*.json' |
| 13 | + - yarn.lock |
| 14 | + - .github/**/*.yml |
| 15 | + |
| 16 | +jobs: |
| 17 | + test: |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + platform: [ubuntu-latest, macOS-latest] |
| 21 | + node: ['12.x'] |
| 22 | + name: test/node ${{ matrix.node }}/${{ matrix.platform }} |
| 23 | + runs-on: ${{ matrix.platform }} |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@master |
| 26 | + - uses: actions/setup-node@master |
| 27 | + with: |
| 28 | + node-version: ${{ matrix.node }} |
| 29 | + - run: npx yarn bootstrap |
| 30 | + - run: npx yarn test |
| 31 | + |
| 32 | + coverage: |
| 33 | + needs: [test] |
| 34 | + name: coverage |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@master |
| 38 | + - uses: actions/setup-node@master |
| 39 | + with: |
| 40 | + node-version: 12.x |
| 41 | + - run: npx yarn bootstrap |
| 42 | + - uses: paambaati/codeclimate-action@v2.5.3 |
| 43 | + env: |
| 44 | + CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} |
| 45 | + with: |
| 46 | + coverageCommand: npx yarn coverage |
| 47 | + debug: true |
| 48 | + |
| 49 | + publish: |
| 50 | + needs: [test] |
| 51 | + name: Publish example app to Expo 🚀 |
| 52 | + runs-on: ubuntu-latest |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v2 |
| 55 | + - uses: actions/setup-node@v1 |
| 56 | + with: |
| 57 | + node-version: 12.x |
| 58 | + - uses: expo/expo-github-action@v5 |
| 59 | + with: |
| 60 | + expo-version: 3.x |
| 61 | + expo-username: ${{ secrets.EXPO_CLI_USERNAME }} |
| 62 | + expo-password: ${{ secrets.EXPO_CLI_PASSWORD }} |
| 63 | + - run: npx yarn bootstrap |
| 64 | + - working-directory: example |
| 65 | + run: expo publish |
| 66 | + |
| 67 | + chromatic: |
| 68 | + needs: [test] |
| 69 | + name: Publish storybook to chromatic 🧪 |
| 70 | + defaults: |
| 71 | + run: |
| 72 | + working-directory: example |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v2 |
| 75 | + - uses: actions/setup-node@v1 |
| 76 | + with: |
| 77 | + node-version: 12.x |
| 78 | + - run: cd .. && npx yarn bootstrap && cd example |
| 79 | + - uses: chromaui/action@v1 |
| 80 | + with: |
| 81 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 82 | + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} |
0 commit comments