-
-
Notifications
You must be signed in to change notification settings - Fork 930
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve CI per version setup (#3256)
- use +v to select the version properly (eg don't run all 1.19.x for 1.19) - run on all tested versions specified in version.js
- Loading branch information
Showing
4 changed files
with
26 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,42 +17,44 @@ jobs: | |
with: | ||
node-version: 18.x | ||
- run: npm i && npm run lint | ||
|
||
PrepareSupportedVersions: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 18.x | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 18.x | ||
- id: set-matrix | ||
run: | | ||
node -e " | ||
const testedVersions = require('./lib/version').testedVersions; | ||
console.log('matrix='+JSON.stringify({'include': testedVersions.map(mcVersion => ({mcVersion}))})) | ||
" >> $GITHUB_OUTPUT | ||
MinecraftServer: | ||
needs: PrepareSupportedVersions | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
javaVersion: [1.8] | ||
mcVersion: ['1.8.8', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.5'] | ||
include: | ||
- javaVersion: 16 | ||
mcVersion: '1.17.1' | ||
- javaVersion: 17 | ||
mcVersion: '1.18.2' | ||
- javaVersion: 17 | ||
mcVersion: '1.19' | ||
- javaVersion: 17 | ||
mcVersion: '1.19.2' | ||
- javaVersion: 17 | ||
mcVersion: '1.19.3' | ||
- javaVersion: 17 | ||
mcVersion: '1.19.4' | ||
- javaVersion: 17 | ||
mcVersion: '1.20.1' | ||
matrix: ${{fromJson(needs.PrepareSupportedVersions.outputs.matrix)}} | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
- name: Use Node.js 18.x | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 18.x | ||
- name: Setup Java JDK | ||
uses: actions/[email protected] | ||
with: | ||
java-version: ${{ matrix.javaVersion }} | ||
java-version: 17 | ||
java-package: jre | ||
- name: Install Dependencies | ||
run: npm install | ||
- name: Start Tests | ||
run: npm run mocha_test -- -g ${{ matrix.mcVersion }} | ||
run: npm run mocha_test -- -g ${{ matrix.mcVersion }}v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = { | ||
supportedVersions: ['1.8', '1.9', '1.10', '1.11', '1.12', '1.13', '1.14', '1.15', '1.16', '1.17', '1.18', '1.19', '1.20'], | ||
testedVersions: ['1.8.8', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.5', '1.17.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1'] | ||
} // when updating testedVersions, make sure to update CI.yml | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48c3ca7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WSP