|
| 1 | +# TODO commitlint |
| 2 | +# TODO canary |
| 3 | +# - npm i -g @webpack-contrib/tag-versions |
| 4 | +# npm install webpack@%webpack_version% |
| 5 | +# FOR /F %%I in ('compver --name webpack --gte %webpack_version% --lt latest') do SET COMPARED_VERSION_RESULT=%%I |
| 6 | +# IF %COMPARED_VERSION_RESULT% NEQ -1 (npm run ci:%job_part%) ELSE (ECHO "Next is older than Latest - Skipping Canary Suite") |
| 7 | +# |
| 8 | +# if [[ $(compver --name webpack --gte next --lt latest) < 1 ]] ; then printf "Next is older than Latest - Skipping Canary Suite"; else npm run ci:test || true; fi |
| 9 | +# TODO coverage |
| 10 | +# name: Submit coverage data to codecov. |
| 11 | +# command: bash <(curl -s https://codecov.io/bash) |
| 12 | +# when: on_success |
| 13 | +# TODO fast finish |
| 14 | + |
| 15 | +trigger: |
| 16 | + - master |
| 17 | + - next |
| 18 | + |
| 19 | +jobs: |
| 20 | + - job: Lint |
| 21 | + pool: |
| 22 | + vmImage: ubuntu-16.04 |
| 23 | + steps: |
| 24 | + - task: NodeTool@0 |
| 25 | + inputs: |
| 26 | + versionSpec: ^10.13.0 |
| 27 | + displayName: "Install Node.js" |
| 28 | + - task: Npm@1 |
| 29 | + inputs: |
| 30 | + command: custom |
| 31 | + customCommand: i -g npm@latest |
| 32 | + displayName: 'Install latest NPM' |
| 33 | + - script: | |
| 34 | + node -v |
| 35 | + npm -v |
| 36 | + displayName: "Print versions" |
| 37 | + - task: Npm@1 |
| 38 | + inputs: |
| 39 | + command: custom |
| 40 | + customCommand: ci |
| 41 | + displayName: 'Install dependencies' |
| 42 | + - script: npm run lint |
| 43 | + displayName: "Run lint" |
| 44 | + - script: npm run security |
| 45 | + displayName: "Run NPM audit" |
| 46 | + - script: ./node_modules/.bin/commitlint-azure-pipelines |
| 47 | + displayName: "Run lint commit message" |
| 48 | + |
| 49 | +# - job: Linux |
| 50 | +# pool: |
| 51 | +# vmImage: ubuntu-16.04 |
| 52 | +# strategy: |
| 53 | +# maxParallel: 4 |
| 54 | +# matrix: |
| 55 | +# node-12: |
| 56 | +# node_version: ^12.0.0 |
| 57 | +# node-10: |
| 58 | +# node_version: ^10.13.0 |
| 59 | +# node-8: |
| 60 | +# node_version: ^8.9.0 |
| 61 | +# node-6: |
| 62 | +# node_version: ^6.9.0 |
| 63 | +# steps: |
| 64 | +# - task: NodeTool@0 |
| 65 | +# inputs: |
| 66 | +# versionSpec: $(node_version) |
| 67 | +# displayName: "Install Node.js $(node_version)" |
| 68 | +# - task: Npm@1 |
| 69 | +# inputs: |
| 70 | +# command: custom |
| 71 | +# customCommand: i -g npm@latest |
| 72 | +# displayName: 'Install latest NPM' |
| 73 | +# - script: | |
| 74 | +# node -v |
| 75 | +# npm -v |
| 76 | +# displayName: "Print versions" |
| 77 | +# - task: Npm@1 |
| 78 | +# inputs: |
| 79 | +# command: custom |
| 80 | +# customCommand: ci |
| 81 | +# displayName: 'Install dependencies' |
| 82 | +# - script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit" |
| 83 | +# displayName: "Run tests with coverage" |
| 84 | +# - task: PublishTestResults@2 |
| 85 | +# inputs: |
| 86 | +# testRunTitle: "Linux with Node.js $(node_version)" |
| 87 | +# testResultsFiles: "**/junit.xml" |
| 88 | +# condition: succeededOrFailed() |
| 89 | +# displayName: "Publish test results" |
| 90 | + |
| 91 | +# - job: macOS |
| 92 | +# pool: |
| 93 | +# vmImage: macOS-10.14 |
| 94 | +# strategy: |
| 95 | +# maxParallel: 4 |
| 96 | +# matrix: |
| 97 | +# node-12: |
| 98 | +# node_version: ^12.0.0 |
| 99 | +# node-10: |
| 100 | +# node_version: ^10.13.0 |
| 101 | +# node-8: |
| 102 | +# node_version: ^8.9.0 |
| 103 | +# node-6: |
| 104 | +# node_version: ^6.9.0 |
| 105 | +# steps: |
| 106 | +# - task: NodeTool@0 |
| 107 | +# inputs: |
| 108 | +# versionSpec: $(node_version) |
| 109 | +# displayName: "Install Node.js $(node_version)" |
| 110 | +# - task: Npm@1 |
| 111 | +# inputs: |
| 112 | +# command: custom |
| 113 | +# customCommand: i -g npm@latest |
| 114 | +# displayName: 'Install latest NPM' |
| 115 | +# - script: | |
| 116 | +# node -v |
| 117 | +# npm -v |
| 118 | +# displayName: "Print versions" |
| 119 | +# - task: Npm@1 |
| 120 | +# inputs: |
| 121 | +# command: custom |
| 122 | +# customCommand: ci |
| 123 | +# displayName: 'Install dependencies' |
| 124 | +# - script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit" |
| 125 | +# displayName: "Run tests with coverage" |
| 126 | +# - task: PublishTestResults@2 |
| 127 | +# inputs: |
| 128 | +# testRunTitle: "Linux with Node.js $(node_version)" |
| 129 | +# testResultsFiles: "**/junit.xml" |
| 130 | +# condition: succeededOrFailed() |
| 131 | +# displayName: "Publish test results" |
| 132 | + |
| 133 | +# - job: Windows |
| 134 | +# pool: |
| 135 | +# vmImage: windows-2019 |
| 136 | +# strategy: |
| 137 | +# maxParallel: 4 |
| 138 | +# matrix: |
| 139 | +# node-12: |
| 140 | +# node_version: ^12.0.0 |
| 141 | +# node-10: |
| 142 | +# node_version: ^10.13.0 |
| 143 | +# node-8: |
| 144 | +# node_version: ^8.9.0 |
| 145 | +# node-6: |
| 146 | +# node_version: ^6.9.0 |
| 147 | +# steps: |
| 148 | +# - script: 'git config --global core.autocrlf input' |
| 149 | +# displayName: 'config CRLF' |
| 150 | +# - checkout: self |
| 151 | +# - task: NodeTool@0 |
| 152 | +# inputs: |
| 153 | +# versionSpec: $(node_version) |
| 154 | +# displayName: "Install Node.js $(node_version)" |
| 155 | +# - task: Npm@1 |
| 156 | +# inputs: |
| 157 | +# command: custom |
| 158 | +# customCommand: i -g npm@latest |
| 159 | +# displayName: 'Install latest NPM' |
| 160 | +# - script: | |
| 161 | +# node -v |
| 162 | +# npm -v |
| 163 | +# displayName: "Print versions" |
| 164 | +# - task: Npm@1 |
| 165 | +# inputs: |
| 166 | +# command: custom |
| 167 | +# customCommand: ci |
| 168 | +# displayName: 'Install dependencies' |
| 169 | +# - script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit" |
| 170 | +# displayName: "Run tests with coverage" |
| 171 | +# - task: PublishTestResults@2 |
| 172 | +# inputs: |
| 173 | +# testRunTitle: "Linux with Node.js $(node_version)" |
| 174 | +# testResultsFiles: "**/junit.xml" |
| 175 | +# condition: succeededOrFailed() |
| 176 | +# displayName: "Publish test results" |
0 commit comments