|
| 1 | +name: windows |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - dev |
| 7 | + - 2.x |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - dev |
| 11 | + - 2.x |
| 12 | + |
| 13 | +jobs: |
| 14 | + setup: |
| 15 | + runs-on: ${{ matrix.os }} |
| 16 | + if: github.event_name == 'push' || !((github.base_ref == '2.x') && github.head_ref == 'dev') |
| 17 | + |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + os: [windows-latest] |
| 21 | + node: [12] |
| 22 | + |
| 23 | + steps: |
| 24 | + - uses: actions/setup-node@v1 |
| 25 | + with: |
| 26 | + node-version: ${{ matrix.node }} |
| 27 | + |
| 28 | + - name: checkout |
| 29 | + uses: actions/checkout@v2 |
| 30 | + |
| 31 | + - name: cache node_modules |
| 32 | + id: node_modules_cache_id |
| 33 | + uses: actions/cache@v1 |
| 34 | + with: |
| 35 | + path: node_modules |
| 36 | + key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} |
| 37 | + |
| 38 | + - name: install |
| 39 | + run: yarn --check-files --frozen-lockfile --non-interactive |
| 40 | + |
| 41 | + - name: cache workspace |
| 42 | + uses: actions/cache@v1 |
| 43 | + with: |
| 44 | + path: ${{ github.workspace }} |
| 45 | + key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} |
| 46 | + |
| 47 | + |
| 48 | + # TODO: Investigate [error]Process completed with exit code 1. |
| 49 | + # test-unit: |
| 50 | + # runs-on: ${{ matrix.os }} |
| 51 | + |
| 52 | + # strategy: |
| 53 | + # matrix: |
| 54 | + # os: [windows-latest] |
| 55 | + # node: [12] |
| 56 | + |
| 57 | + # env: |
| 58 | + # NODE_OPTIONS: "--max_old_space_size=4096" |
| 59 | + |
| 60 | + # steps: |
| 61 | + # - uses: actions/setup-node@v1 |
| 62 | + # with: |
| 63 | + # node-version: ${{ matrix.node }} |
| 64 | + |
| 65 | + # - name: checkout |
| 66 | + # uses: actions/checkout@master |
| 67 | + |
| 68 | + # - name: restore workspace cache |
| 69 | + # uses: actions/cache@v1 |
| 70 | + # with: |
| 71 | + # path: ${{ github.workspace }} |
| 72 | + # key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} |
| 73 | + |
| 74 | + # - name: test unit |
| 75 | + # run: node node_modules/jest/bin/jest packages -i --coverage --verbose |
| 76 | + |
| 77 | + # - name: codecov |
| 78 | + # uses: codecov/codecov-action@v1 |
| 79 | + # with: |
| 80 | + # token: ${{ secrets.CODECOV_TOKEN }} |
| 81 | + # flags: unittests |
| 82 | + # needs: setup |
| 83 | + |
| 84 | + build: |
| 85 | + runs-on: ${{ matrix.os }} |
| 86 | + |
| 87 | + strategy: |
| 88 | + matrix: |
| 89 | + os: [windows-latest] |
| 90 | + node: [12] |
| 91 | + |
| 92 | + env: |
| 93 | + NODE_OPTIONS: "--max_old_space_size=4096" |
| 94 | + |
| 95 | + steps: |
| 96 | + - uses: actions/setup-node@v1 |
| 97 | + with: |
| 98 | + node-version: ${{ matrix.node }} |
| 99 | + |
| 100 | + - name: checkout |
| 101 | + uses: actions/checkout@master |
| 102 | + |
| 103 | + - name: restore workspace cache |
| 104 | + uses: actions/cache@v1 |
| 105 | + with: |
| 106 | + path: ${{ github.workspace }} |
| 107 | + key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} |
| 108 | + |
| 109 | + - name: build |
| 110 | + run: yarn test:fixtures -i |
| 111 | + |
| 112 | + - name: cache fixtures |
| 113 | + uses: actions/cache@v1 |
| 114 | + with: |
| 115 | + path: test/fixtures |
| 116 | + key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }} |
| 117 | + needs: setup |
| 118 | + |
| 119 | + test-dev: |
| 120 | + runs-on: ${{ matrix.os }} |
| 121 | + |
| 122 | + strategy: |
| 123 | + matrix: |
| 124 | + os: [windows-latest] |
| 125 | + node: [12] |
| 126 | + |
| 127 | + env: |
| 128 | + NODE_OPTIONS: "--max_old_space_size=4096" |
| 129 | + |
| 130 | + steps: |
| 131 | + - uses: actions/setup-node@v1 |
| 132 | + with: |
| 133 | + node-version: ${{ matrix.node }} |
| 134 | + |
| 135 | + - name: checkout |
| 136 | + uses: actions/checkout@master |
| 137 | + |
| 138 | + - name: restore workspace cache |
| 139 | + uses: actions/cache@v1 |
| 140 | + with: |
| 141 | + path: ${{ github.workspace }} |
| 142 | + key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} |
| 143 | + |
| 144 | + - name: restore fixtures |
| 145 | + uses: actions/cache@v1 |
| 146 | + with: |
| 147 | + path: test/fixtures |
| 148 | + key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }} |
| 149 | + |
| 150 | + - name: test dev |
| 151 | + run: yarn test:dev -i |
| 152 | + needs: build |
0 commit comments