-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve per version CI following mineflayer example. (#646)
* Improve per version CI following mineflayer example. * Change build name for test. * fix simple test
- Loading branch information
Showing
5 changed files
with
44 additions
and
67 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 |
---|---|---|
|
@@ -2,29 +2,54 @@ name: CI | |
|
||
on: | ||
push: | ||
branches: [ master ] | ||
branches: | ||
- master | ||
pull_request: | ||
branches: [ master, "1.13" ] | ||
|
||
jobs: | ||
build: | ||
Lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 18.x | ||
uses: actions/[email protected] | ||
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 supportedVersions = require('./src/lib/version').supportedVersions; | ||
console.log('matrix='+JSON.stringify({'include': supportedVersions.map(mcVersion => ({mcVersion}))})) | ||
" >> $GITHUB_OUTPUT | ||
Test: | ||
needs: PrepareSupportedVersions | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
mcVersionIndex: [0, 1, 2, 3, 4, 5, 6, 7, 8] | ||
matrix: ${{fromJson(needs.PrepareSupportedVersions.outputs.matrix)}} | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- env: | ||
CIRCLE_NODE_INDEX: ${{ matrix.mcVersionIndex }} | ||
CIRCLE_NODE_TOTAL: 9 | ||
run: npm test | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 18.x | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 18.x | ||
- name: Install Dependencies | ||
run: npm install | ||
- name: Start Tests | ||
run: npm run mocha_test -- -g ${{ matrix.mcVersion }}v |
This file was deleted.
Oops, something went wrong.
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
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