Skip to content

Add Speed Upgrades and Downgrades #6

Add Speed Upgrades and Downgrades

Add Speed Upgrades and Downgrades #6

Workflow file for this run

name: Verify Build and Generated Data
# Run on any pull request commit or a push to a main branch.
# If run on the primary branch, the gradle caches will be updated for all PRs to use.
on:
pull_request:
branches:
- main
merge_group:
branches:
- main
jobs:
verify:
runs-on: ubuntu-22.04
concurrency:
group: run_linters-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Store committed data
run: cp -r src/generated generatedBak
- uses: gradle/actions/setup-gradle@v3
- name: Build
run: ./gradlew build
- name: Run data generator
run: ./gradlew runDataProd
- name: Check data generated successfully # So we do this to ensure something was done, .cache will always be written
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "src/generated/resources/.cache/"
- name: Remove generation cache for comparison
run: rm -rf src/generated/resources/.cache
- name: Compare generated resources
run: |
diff -r --strip-trailing-cr --ignore-blank-lines generatedBak src/generated
if [ $? -ne 0 ]; then
echo "Mismatch between generated data and committed data, please re-run runDataProd and push those changes.";
exit 1;
fi
echo "Passed data check";