|
| 1 | +name: 'Build & Test' |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + - release/** |
| 7 | + pull_request: |
| 8 | + |
| 9 | +jobs: |
| 10 | + job_build: |
| 11 | + name: Build |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v2 |
| 15 | + - uses: actions/setup-node@v1 |
| 16 | + - uses: actions/cache@v2 |
| 17 | + with: |
| 18 | + path: | |
| 19 | + node_modules |
| 20 | + */*/node_modules |
| 21 | + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} |
| 22 | + - name: Install |
| 23 | + run: yarn install |
| 24 | + - name: Build |
| 25 | + run: yarn build |
| 26 | + - name: Archive production artifacts |
| 27 | + uses: actions/upload-artifact@v2 |
| 28 | + with: |
| 29 | + name: build |
| 30 | + path: | |
| 31 | + ${{ github.workspace }}/packages/**/build |
| 32 | + ${{ github.workspace }}/packages/**/dist |
| 33 | + ${{ github.workspace }}/packages/**/esm |
| 34 | +
|
| 35 | + job_size_check: |
| 36 | + name: Size Check |
| 37 | + needs: job_build |
| 38 | + runs-on: ubuntu-latest |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v2 |
| 41 | + - uses: actions/setup-node@v1 |
| 42 | + - uses: actions/cache@v2 |
| 43 | + with: |
| 44 | + path: | |
| 45 | + node_modules |
| 46 | + */*/node_modules |
| 47 | + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} |
| 48 | + - run: yarn install |
| 49 | + - uses: actions/download-artifact@v2 |
| 50 | + with: |
| 51 | + name: build |
| 52 | + path: ${{ github.workspace }}/packages |
| 53 | + - uses: andresz1/[email protected] |
| 54 | + with: |
| 55 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 56 | + build_script: echo "doing nothing" |
| 57 | + skip_step: install |
| 58 | + |
| 59 | + job_lint: |
| 60 | + name: Lint |
| 61 | + needs: job_build |
| 62 | + runs-on: ubuntu-latest |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v2 |
| 65 | + - uses: actions/setup-node@v1 |
| 66 | + - uses: actions/cache@v2 |
| 67 | + with: |
| 68 | + path: | |
| 69 | + node_modules |
| 70 | + */*/node_modules |
| 71 | + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} |
| 72 | + - run: yarn install |
| 73 | + - uses: actions/download-artifact@v2 |
| 74 | + with: |
| 75 | + name: build |
| 76 | + path: ${{ github.workspace }}/packages |
| 77 | + - name: Run Linter |
| 78 | + run: yarn lint |
| 79 | + |
| 80 | + job_unit_test: |
| 81 | + name: Test |
| 82 | + needs: job_build |
| 83 | + runs-on: ubuntu-latest |
| 84 | + steps: |
| 85 | + - uses: actions/checkout@v2 |
| 86 | + - uses: actions/setup-node@v1 |
| 87 | + - uses: actions/cache@v2 |
| 88 | + with: |
| 89 | + path: | |
| 90 | + node_modules |
| 91 | + */*/node_modules |
| 92 | + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} |
| 93 | + - run: yarn install |
| 94 | + - uses: actions/download-artifact@v2 |
| 95 | + with: |
| 96 | + name: build |
| 97 | + path: ${{ github.workspace }}/packages |
| 98 | + - name: Unit Tests |
| 99 | + run: yarn test |
0 commit comments