#1 - Test PR with bad filename in mod metadata (file doesn't exist) #42
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, labeled] | |
jobs: | |
voron_ci: | |
if: ${{ contains( github.event.pull_request.labels.*.name, 'Ready for 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: Prepare Sparse Checkout 🧹 | |
id: sanitize_file_list | |
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest | |
env: | |
SPARSE_CHECKOUT_HELPER_INPUT: ${{ steps.changed-files.outputs.all_changed_files }} | |
with: | |
args: prepare-sparse-checkout | |
- 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.SPARSE_CHECKOUT_HELPER_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/licenses/file sizes based on files in the test directory | |
- name: Check files for whitespace/licenses/file sizes 🔍 | |
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest | |
env: | |
FILE_CHECKER_IGNORE_WARNINGS: true | |
FILE_CHECKER_CHECK_LICENSE: true | |
FILE_CHECKER_CHECK_FILE_SIZE_MB: 2 | |
with: | |
args: check-files | |
- 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: true | |
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 }} |