2020-06-07 17:31:42 -04:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-06-12 22:54:16 -04:00
|
|
|
branches:
|
|
|
|
- master
|
2020-06-07 17:31:42 -04:00
|
|
|
pull_request:
|
2021-06-12 22:54:16 -04:00
|
|
|
branches:
|
|
|
|
- master
|
2020-06-07 17:31:42 -04:00
|
|
|
|
|
|
|
jobs:
|
2023-12-27 18:12:23 -05:00
|
|
|
Lint:
|
2020-06-07 17:31:42 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2023-06-03 17:17:27 -04:00
|
|
|
- name: Use Node.js 18.x
|
2023-12-27 18:12:23 -05:00
|
|
|
uses: actions/setup-node@v1.4.4
|
2020-06-07 17:31:42 -04:00
|
|
|
with:
|
2023-06-03 17:17:27 -04:00
|
|
|
node-version: 18.x
|
2023-12-27 18:12:23 -05:00
|
|
|
- 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/setup-node@v1.4.4
|
2020-06-07 17:31:42 -04:00
|
|
|
with:
|
2023-12-27 18:12:23 -05:00
|
|
|
node-version: 18.x
|
|
|
|
- id: set-matrix
|
|
|
|
run: |
|
|
|
|
node -e "
|
|
|
|
const supportedVersions = require('./src/version').supportedVersions;
|
|
|
|
console.log('matrix='+JSON.stringify({'include': supportedVersions.map(mcVersion => ({mcVersion}))}))
|
|
|
|
" >> $GITHUB_OUTPUT
|
|
|
|
test:
|
|
|
|
needs: PrepareSupportedVersions
|
2021-04-07 10:13:57 -04:00
|
|
|
runs-on: ubuntu-latest
|
2023-12-27 18:12:23 -05:00
|
|
|
strategy:
|
|
|
|
matrix: ${{fromJson(needs.PrepareSupportedVersions.outputs.matrix)}}
|
|
|
|
fail-fast: false
|
2021-04-07 10:13:57 -04:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2023-06-03 17:17:27 -04:00
|
|
|
- name: Use Node.js 18.x
|
2021-04-07 10:13:57 -04:00
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
2023-06-03 17:17:27 -04:00
|
|
|
node-version: 18.x
|
2021-04-07 10:13:57 -04:00
|
|
|
- name: Setup Java JDK
|
|
|
|
uses: actions/setup-java@v1.4.3
|
|
|
|
with:
|
2024-10-12 17:55:36 -04:00
|
|
|
java-version: '21'
|
2021-06-28 18:27:37 -04:00
|
|
|
distribution: 'adopt'
|
2023-12-27 18:12:23 -05:00
|
|
|
- name: Install dependencies
|
|
|
|
run: npm install
|
|
|
|
- name: Run tests
|
|
|
|
run: npm run mochaTest -- -g ${{ matrix.mcVersion }}v
|