#3 - Test PR with non-corrupt STLs #35
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: VoronCI PR Test CI | |
run-name: "#${{github.event.number}} - ${{github.event.pull_request.title}}" | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
voron_ci: | |
env: | |
VORON_TOOLKIT_OUTPUT_DIR: ${{ github.workspace }}/workflow_output | |
VORON_TOOLKIT_INPUT_DIR: ${{ github.workspace }}/tests/test_repository_root/printer_mods | |
VORON_TOOLKIT_GH_STEP_SUMMARY: true | |
VORON_TOOLKIT_VERBOSE: true | |
runs-on: ubuntu-latest | |
steps: | |
- id: changed-files | |
name: Get changed files 🔀 | |
# Check out files, separate with newlines to catch whitespace in filenames | |
uses: tj-actions/changed-files@v37 | |
with: | |
separator: "\n" | |
# Sanitize the file list | |
- name: Sanitize file list 🧹 | |
id: sanitize_file_list | |
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest | |
env: | |
FILE_LIST_SANITIZE_INPUT: ${{ steps.changed-files.outputs.all_changed_files }} | |
with: | |
args: sanitize-file-list | |
- name: Perform sparse checkout ↪️ | |
# Perform a sparse checkout, checking out only the files of the PR | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
with: | |
ref: ${{ github.ref }} | |
path: ${{ github.workspace }} | |
sparse-checkout: ${{ steps.sanitize_file_list.outputs.FILE_LIST_SANITIZE_OUTPUT }} | |
sparse-checkout-cone-mode: false | |
- name: Store PR number 🔢 | |
if: '!cancelled()' | |
run: | | |
mkdir -p ${{ env.VORON_TOOLKIT_OUTPUT_DIR }} | |
echo -n ${{ github.event.number }} > ${{ env.VORON_TOOLKIT_OUTPUT_DIR }}/pr_number.txt | |
# Run whitespace checks based on files in the test directory | |
- name: Check for whitespace in folders/filenames 🔍 | |
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest | |
env: | |
WHITESPACE_CHECKER_IGNORE_WARNINGS: false | |
with: | |
args: check-whitespace | |
- name: Check correct mod/file structure 🔍 | |
if: '!cancelled()' | |
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest | |
env: | |
MOD_STRUCTURE_CHECKER_IGNORE_WARNINGS: false | |
with: | |
args: check-mod-structure | |
# Run the corruption checker | |
- name: Check for STL corruption 🔍 | |
if: '!cancelled()' | |
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest | |
env: | |
CORRUPTION_CHECKER_IGNORE_WARNINGS: false | |
with: | |
args: check-stl-corruption | |
# Run the rotation checker | |
- name: Check for incorrect STL rotation 🔍 | |
if: '!cancelled()' | |
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest | |
env: | |
ROTATION_CHECKER_IGNORE_WARNINGS: true | |
ROTATION_CHECKER_IMAGEKIT_ENDPOINT: https://ik.imagekit.io/vorondesign | |
ROTATION_CHECKER_IMAGEKIT_SUBFOLDER: ci_${{github.event.number}} | |
with: | |
args: check-stl-rotation | |
# Generate a README | |
- name: Generate README 📒 | |
if: '!cancelled()' | |
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest | |
env: | |
README_GENERATOR_MARKDOWN: false | |
README_GENERATOR_JSON: false | |
with: | |
args: generate-readme | |
# Upload Artifact | |
- name: Upload build artifacts 📦 | |
uses: actions/upload-artifact@65d862660abb392b8c4a3d1195a2108db131dd05 | |
if: '!cancelled()' | |
with: | |
name: ci_output | |
path: ${{ env.VORON_TOOLKIT_OUTPUT_DIR }} |