Make JSON Diff instead of what is there now #355
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
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- run: npm install | |
- run: npm test | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
if: "github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'Add bench data')" #for prs, we use the pr-workflow | |
strategy: | |
matrix: | |
mcVersionIndex: ["1.8", "1.9", "1.10", "1.11", "1.11.2", "1.12", "1.13", "1.14", "1.15", "1.16", "1.16.5", '1.17', '1.18', '1.18.2'] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- name: Setup Java JDK | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
java-package: jre | |
- run: npm install | |
- name: Use Dumper | |
run: | | |
mkdir output | |
node bin/dumpPackets -v ${{ matrix.mcVersionIndex }} -o output/${{ matrix.mcVersionIndex }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: packets | |
path: output | |
upload-bench: | |
runs-on: ubuntu-latest | |
if: "github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'Add bench data')" #for prs, we use the pr-workflow | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 12.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- uses: actions/download-artifact@v2 | |
with: | |
name: packets | |
path: bench | |
- name: Generate Diff | |
run: rm -rf bench/*/from-server && rm -rf bench/*/README.md | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Add bench data |