|
6 | 6 | pull_request:
|
7 | 7 | branches:
|
8 | 8 | - '**'
|
| 9 | +env: |
| 10 | + NODE_VERSION: 16.9.0 |
9 | 11 | jobs:
|
| 12 | + check-ci: |
| 13 | + name: CI Self-Check |
| 14 | + timeout-minutes: 15 |
| 15 | + runs-on: ubuntu-18.04 |
| 16 | + steps: |
| 17 | + - name: Determine major node version |
| 18 | + id: node |
| 19 | + run: | |
| 20 | + node_major=$(echo "${{ env.NODE_VERSION }}" | cut -d'.' -f1) |
| 21 | + echo "::set-output name=node_major::$(echo $node_major)" |
| 22 | + - uses: actions/checkout@v2 |
| 23 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 24 | + uses: actions/setup-node@v1 |
| 25 | + with: |
| 26 | + node-version: ${{ env.node-version }} |
| 27 | + - name: Cache Node.js modules |
| 28 | + uses: actions/cache@v2 |
| 29 | + with: |
| 30 | + path: ~/.npm |
| 31 | + key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} |
| 32 | + restore-keys: | |
| 33 | + ${{ runner.os }}-node-${{ env.NODE_VERSION }}- |
| 34 | + - name: Install dependencies |
| 35 | + run: npm ci |
| 36 | + - name: CI Environments Check |
| 37 | + run: npm run ci:check |
| 38 | + - name: CI Node Engine Check |
| 39 | + run: npm run ci:checkNodeEngine |
10 | 40 | check-changelog:
|
11 | 41 | name: Changelog
|
12 | 42 | timeout-minutes: 5
|
13 | 43 | runs-on: ubuntu-18.04
|
14 | 44 | steps:
|
15 | 45 | - uses: actions/checkout@v2
|
16 | 46 | - uses: dangoslen/changelog-enforcer@v2
|
17 |
| - build: |
| 47 | + # check-lint: |
| 48 | + # name: Lint |
| 49 | + # timeout-minutes: 15 |
| 50 | + # runs-on: ubuntu-18.04 |
| 51 | + # steps: |
| 52 | + # - uses: actions/checkout@v2 |
| 53 | + # - name: Use Node.js ${{ env.NODE_VERSION }} |
| 54 | + # uses: actions/setup-node@v1 |
| 55 | + # with: |
| 56 | + # node-version: ${{ env.node-version }} |
| 57 | + # - name: Cache Node.js modules |
| 58 | + # uses: actions/cache@v2 |
| 59 | + # with: |
| 60 | + # path: ~/.npm |
| 61 | + # key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} |
| 62 | + # restore-keys: | |
| 63 | + # ${{ runner.os }}-node-${{ env.NODE_VERSION }}- |
| 64 | + # - name: Install dependencies |
| 65 | + # run: npm ci |
| 66 | + # - run: npm run lint |
| 67 | + check-circular: |
| 68 | + name: Circular Dependencies |
| 69 | + timeout-minutes: 5 |
| 70 | + runs-on: ubuntu-18.04 |
| 71 | + steps: |
| 72 | + - uses: actions/checkout@v2 |
| 73 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 74 | + uses: actions/setup-node@v1 |
| 75 | + with: |
| 76 | + node-version: ${{ env.node-version }} |
| 77 | + - name: Cache Node.js modules |
| 78 | + uses: actions/cache@v2 |
| 79 | + with: |
| 80 | + path: ~/.npm |
| 81 | + key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} |
| 82 | + restore-keys: | |
| 83 | + ${{ runner.os }}-node-${{ env.NODE_VERSION }}- |
| 84 | + - name: Install dependencies |
| 85 | + run: npm ci |
| 86 | + - name: Scan for circular dependencies |
| 87 | + run: npm run madge:circular |
| 88 | + check-docker: |
| 89 | + strategy: |
| 90 | + matrix: |
| 91 | + include: |
| 92 | + - name: Docker linux/amd64 |
| 93 | + DOCKER_PLATFORM: linux/amd64 |
| 94 | + # Building currently fails for the platforms below |
| 95 | + # - name: Docker linux/arm/v6 |
| 96 | + # DOCKER_PLATFORM: linux/arm/v6 |
| 97 | + # - name: Docker linux/arm/v7 |
| 98 | + # DOCKER_PLATFORM: linux/arm/v7 |
| 99 | + # - name: Docker linux/arm64/v8 |
| 100 | + # DOCKER_PLATFORM: linux/arm64/v8 |
| 101 | + fail-fast: false |
| 102 | + name: ${{ matrix.name }} |
| 103 | + timeout-minutes: 15 |
18 | 104 | runs-on: ubuntu-18.04
|
19 |
| - timeout-minutes: 30 |
20 | 105 | steps:
|
21 |
| - - uses: actions/checkout@v2 |
22 |
| - - name: Use Node.js |
23 |
| - uses: actions/setup-node@v1 |
24 |
| - with: |
25 |
| - node-version: '10.14' |
26 |
| - - name: Cache Node.js modules |
27 |
| - uses: actions/cache@v2 |
28 |
| - with: |
29 |
| - path: ~/.npm |
30 |
| - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} |
31 |
| - restore-keys: | |
32 |
| - ${{ runner.os }}-node- |
33 |
| - - run: npm ci |
34 |
| - - run: ./scripts/before_script.sh |
35 |
| - env: |
36 |
| - CI: true |
| 106 | + - uses: actions/checkout@v2 |
| 107 | + - name: Set up QEMU |
| 108 | + uses: docker/setup-qemu-action@v1 |
| 109 | + - name: Set up Docker Buildx |
| 110 | + uses: docker/setup-buildx-action@v1 |
| 111 | + - name: Build docker image |
| 112 | + uses: docker/build-push-action@v2 |
| 113 | + with: |
| 114 | + platforms: ${{ matrix.DOCKER_PLATFORM }} |
| 115 | + check-lock-file-version: |
| 116 | + name: NPM Lock File Version |
| 117 | + timeout-minutes: 5 |
| 118 | + runs-on: ubuntu-18.04 |
| 119 | + steps: |
| 120 | + - uses: actions/checkout@v2 |
| 121 | + - name: Check NPM lock file version |
| 122 | + uses: mansona/npm-lockfile-version@v1 |
| 123 | + with: |
| 124 | + version: 1 |
| 125 | + check-build: |
| 126 | + strategy: |
| 127 | + matrix: |
| 128 | + include: |
| 129 | + - name: Node 12 |
| 130 | + NODE_VERSION: 12.22.6 |
| 131 | + - name: Node 14 |
| 132 | + NODE_VERSION: 14.17.6 |
| 133 | + # Enable the following lines when Parse Dashboard reached Node 16 compatibility |
| 134 | + #- name: Node 16 |
| 135 | + # NODE_VERSION: 16.9.0 |
| 136 | + fail-fast: false |
| 137 | + name: ${{ matrix.name }} |
| 138 | + timeout-minutes: 15 |
| 139 | + runs-on: ubuntu-18.04 |
| 140 | + env: |
| 141 | + NODE_VERSION: ${{ matrix.NODE_VERSION }} |
| 142 | + steps: |
| 143 | + - name: Determine major node version |
| 144 | + id: node |
| 145 | + run: | |
| 146 | + node_major=$(echo "${{ matrix.NODE_VERSION }}" | cut -d'.' -f1) |
| 147 | + echo "::set-output name=node_major::$(echo $node_major)" |
| 148 | + - uses: actions/checkout@v2 |
| 149 | + - name: Use Node.js ${{ matrix.NODE_VERSION }} |
| 150 | + uses: actions/setup-node@v1 |
| 151 | + with: |
| 152 | + node-version: ${{ matrix.NODE_VERSION }} |
| 153 | + - name: Cache Node.js modules |
| 154 | + uses: actions/cache@v2 |
| 155 | + with: |
| 156 | + path: ~/.npm |
| 157 | + key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} |
| 158 | + restore-keys: | |
| 159 | + ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}- |
| 160 | + - name: Install dependencies (Node < 10) |
| 161 | + run: npm install |
| 162 | + if: ${{ steps.node.outputs.node_major < 10 }} |
| 163 | + - name: Install dependencies (Node >= 10) |
| 164 | + run: npm ci |
| 165 | + if: ${{ steps.node.outputs.node_major >= 10 }} |
| 166 | + - name: Test bundles |
| 167 | + run: ./scripts/before_script.sh |
| 168 | + env: |
| 169 | + CI: true |
0 commit comments