|
6 | 6 | pull_request:
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - build: |
10 |
| - runs-on: ${{ matrix.os }} |
11 |
| - |
12 |
| - strategy: |
13 |
| - matrix: |
14 |
| - os: [ubuntu-latest, macOS-latest] #, windows-latest] # TODO add an e2etest.bat file |
15 |
| - node-version: ['*'] |
16 |
| - exclude: |
17 |
| - - os: macOS-latest |
18 |
| - node-version: 14.15.0 |
19 |
| - # - os: windows-latest |
20 |
| - # node-version: 14.15.0 |
21 |
| - fail-fast: false |
| 9 | + build-ubuntu: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v3 |
| 13 | + - uses: actions/setup-node@v3 |
| 14 | + with: |
| 15 | + node-version: '*' |
| 16 | + - name: Global Node packages cache |
| 17 | + uses: actions/cache@v3 |
| 18 | + with: |
| 19 | + path: ~/.npm |
| 20 | + key: |
| 21 | + ubuntu--build-${{ env.cache-name }}-${{ |
| 22 | + hashFiles('**/package-lock.json') }} |
| 23 | + - name: Test fixture dependency cache |
| 24 | + uses: actions/cache@v3 |
| 25 | + with: |
| 26 | + path: plugin/test/fixtures/**/node_modules |
| 27 | + key: |
| 28 | + ubuntu-build-${{ env.cache-name }}-${{ |
| 29 | + hashFiles('plugin/test/fixtures/**/package.json') }}-node-modules |
| 30 | + - run: npm install -g netlify-cli |
| 31 | + - run: npm ci |
| 32 | + - run: cd plugin && npm ci && npm run build |
| 33 | + - run: npm test |
22 | 34 |
|
| 35 | + build-mac: |
| 36 | + runs-on: macOS-latest |
| 37 | + if: github.ref_name == 'main' |
23 | 38 | steps:
|
24 | 39 | - uses: actions/checkout@v3
|
25 |
| - - name: Use Node.js ${{ matrix.node-version }} |
26 |
| - uses: actions/setup-node@v3 |
| 40 | + - uses: actions/setup-node@v3 |
| 41 | + with: |
| 42 | + node-version: '*' |
| 43 | + - name: Global Node packages cache |
| 44 | + uses: actions/cache@v3 |
| 45 | + with: |
| 46 | + path: ~/.npm |
| 47 | + key: |
| 48 | + macOS-build-${{ env.cache-name }}-${{ |
| 49 | + hashFiles('**/package-lock.json') }} |
| 50 | + - name: Test fixture dependency cache |
| 51 | + uses: actions/cache@v3 |
27 | 52 | with:
|
28 |
| - node-version: ${{ matrix.node-version }} |
29 |
| - check-latest: '*' |
| 53 | + path: plugin/test/fixtures/**/node_modules |
| 54 | + key: |
| 55 | + macOS-build-${{ env.cache-name }}-${{ |
| 56 | + hashFiles('plugin/test/fixtures/**/package.json') }}-node-modules |
30 | 57 | - run: npm install -g netlify-cli
|
31 | 58 | - run: npm ci
|
32 | 59 | - run: cd plugin && npm ci && npm run build
|
|
0 commit comments