Skip to content

Commit

Permalink
ci: test new workflow
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
FHeilmann committed Jan 5, 2024
1 parent 932c1da commit 4863473
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/test_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,53 @@ on:
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_OUTPUT_DIR: /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:
- name: Ready for CI label detected ✅
if: ${{ contains( github.event.pull_request.labels.*.name, 'Ready for CI') }}
id: label-detected
run: |
mkdir -p ${{ env.VORON_TOOLKIT_OUTPUT_DIR }}
echo -n '{"pr_number": ${{ github.event.number }}, "skipped": false}' > ${{ env.VORON_TOOLKIT_OUTPUT_DIR }}/ci_result.json
- name: Ready for CI label not detected ❌
if: ${{ !contains( github.event.pull_request.labels.*.name, 'Ready for CI') }}
id: label-not-detected
run: |
mkdir -p ${{ env.VORON_TOOLKIT_OUTPUT_DIR }}
echo -n '{"pr_number": ${{ github.event.number }}, "skipped": true}' > ${{ env.VORON_TOOLKIT_OUTPUT_DIR }}/ci_result.json
- id: changed-files
if: ${{ !cancelled() && steps.label-detected.outcome == 'success' }}
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 🧹
if: ${{ !cancelled() && steps.label-detected.outcome == 'success' }}
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 ↪️
if: ${{ !cancelled() && steps.label-detected.outcome == 'success' }}
# 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 🔍
if: ${{ !cancelled() && steps.label-detected.outcome == 'success' }}
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest
env:
FILE_CHECKER_IGNORE_WARNINGS: true
Expand All @@ -50,23 +60,23 @@ jobs:
with:
args: check-files
- name: Check correct mod/file structure 🔍
if: '!cancelled()'
if: ${{ !cancelled() && steps.label-detected.outcome == 'success' }}
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()'
if: ${{ !cancelled() && steps.label-detected.outcome == 'success' }}
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()'
if: ${{ !cancelled() && steps.label-detected.outcome == 'success' }}
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest
env:
ROTATION_CHECKER_IGNORE_WARNINGS: true
Expand All @@ -76,7 +86,7 @@ jobs:
args: check-stl-rotation
# Generate a README
- name: Generate README 📒
if: '!cancelled()'
if: ${{ !cancelled() && steps.label-detected.outcome == 'success' }}
uses: docker://ghcr.io/vorondesign/voron_toolkit_docker:latest
env:
README_GENERATOR_MARKDOWN: false
Expand Down

0 comments on commit 4863473

Please sign in to comment.