Skip to content

Commit

Permalink
feat: Test workflow, Better GH helper
Browse files Browse the repository at this point in the history
  • Loading branch information
FHeilmann committed Dec 10, 2023
1 parent 02e571e commit a1b2419
Show file tree
Hide file tree
Showing 95 changed files with 1,042,668 additions and 415 deletions.
89 changes: 89 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Git
.git
.gitignore
.gitattributes


# CI
.codeclimate.yml
.travis.yml
.taskcluster.yml

# Docker
docker-compose.yml
Dockerfile
.docker
.dockerignore

# Byte-compiled / optimized / DLL files
**/__pycache__/
**/*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Virtual environment
.env
.venv/
venv/

# PyCharm
.idea

# Python mode for VIM
.ropeproject
**/.ropeproject

# Vim swap files
**/*.swp

# VS Code
.vscode/
70 changes: 62 additions & 8 deletions .github/workflows/test_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,75 @@ on:
workflow_dispatch:
jobs:
test_job:
env:
CORRUPTION_CHECKER_INPUT_DIR: tests/test_repository_root/printer_mods
ROTATION_CHECKER_INPUT_DIR: tests/test_repository_root/printer_mods
runs-on: ubuntu-latest
steps:
# Checkout the entire repo
- name: Checkout repo
uses: actions/checkout@v4
- name: Echo GITHUB_STEP_SUMMARY
uses: docker://ghcr.io/fheilmann/voron_ci_container:latest
uses: docker://voron_ci_container:latest
with:
args: debug-container
- name: LS Repo
uses: docker://ghcr.io/fheilmann/voron_ci_container:latest
# Fake tj-actions/changed-files by creating a list of all files in the test directory
- name: Fake tj-actions/changed-files
id: list_files
run: |
export TEST=$(find ./tests/test_repository_root/printer_mods/ -type f -print)
echo "FILE_LIST<<EOF" >> $GITHUB_OUTPUT
echo "$TEST" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Sanitize the file list
- name: Sanitize file list
id: sanitize_file_list
uses: docker://voron_ci_container:latest
env:
FILE_LIST_SANITIZE_INPUT: ${{ steps.list_files.outputs.FILE_LIST }}
with:
args: ls -al /github/workspace
- name: Test extra env
uses: docker://ghcr.io/fheilmann/voron_ci_container:latest
args: sanitize-file-list
# Run whitespace checks based on files in the test directory
- name: Whitespace Checker (input_dir)
uses: docker://voron_ci_container:latest
env:
GITHUB_TOKEN: ${{ github.token }}
WHITESPACE_CHECKER_INPUT_DIR: tests/test_repository_root/printer_mods
WHITESPACE_CHECKER_VERBOSE: true
WHITESPACE_CHECKER_IGNORE_WARNINGS: false
WHITESPACE_CHECKER_GITHUB_STEP_SUMMARY: false
WHITESPACE_CHECKER_OUTPUT_DIR: workflow_output
with:
args: debug-container
args: check-whitespace
# Run the corruption checker
- name: Corruption Checker
uses: docker://voron_ci_container:latest
env:
CORRUPTION_CHECKER_VERBOSE: true
CORRUPTION_CHECKER_IGNORE_WARNINGS: true
CORRUPTION_CHECKER_GITHUB_STEP_SUMMARY: false
CORRUPTION_CHECKER_OUTPUT_DIR: workflow_output
with:
args: check-stl-corruption
# Run the rotation checker
- name: Rotation Checker
uses: docker://voron_ci_container:latest
env:
ROTATION_CHECKER_VERBOSE: true
ROTATION_CHECKER_IGNORE_WARNINGS: true
ROTATION_CHECKER_GITHUB_STEP_SUMMARY: false
ROTATION_CHECKER_OUTPUT_DIR: workflow_output
ROTATION_CHECKER_IMAGEKIT_ENDPOINT: ./
ROTATION_CHECKER_IMAGEKIT_SUBFOLDER: test_run
with:
args: check-stl-rotation
# Generate a README
- name: Generate README
uses: docker://voron_ci_container:latest
env:
README_GENERATOR_INPUT_DIR: tests/test_repository_root/printer_mods
README_GENERATOR_README: true
README_GENERATOR_VERBOSE: true
README_GENERATOR_JSON: true
README_GENERATOR_OUTPUT_DIR: workflow_output
with:
args: generate-readme
44 changes: 43 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pyyaml = "^6.0.1"
gitpython = "^3.1.40"
requests = "^2.31.0"
configargparse = "^1.7"
coloredlogs = "^15.0.1"


[tool.poetry.group.dev.dependencies]
Expand Down Expand Up @@ -56,6 +57,7 @@ module = [
"tweaker3.*",
"imagekitio.*",
"configargparse.*",
"coloredlogs.*",
]
ignore_missing_imports = true

Expand All @@ -67,3 +69,4 @@ check-whitespace = "voron_ci.tools.whitespace_checker:main"
upload-images = "voron_ci.tools.imagekit_uploader:main"
generate-readme = "voron_ci.tools.readme_generator:main"
debug-container = "voron_ci.utils.debug_container:print_container_info"
sanitize-file-list = "voron_ci.utils.github_action_helper:GithubActionHelper.sanitize_file_list"
20 changes: 20 additions & 0 deletions tests/test_repository_root/printer_mods/1-0-R/handle/.metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cad:
- CAD/handle.FCStd
- CAD/handle.step
description: Handle for Voron 2.4
images:
- images/handle.jpg
- images/extrusion_with_inner_part_mounted.jpg
- images/extrusion_with_handle.jpg
- images/handle_rendering.jpg
- images/extrusion_with_all_handle_parts.jpg
- images/extrusion_with_tnuts.jpg
- images/nuts_and_bolts.jpg
- images/handle_inner_part.jpg
- images/handle_middle_part.jpg
- images/handle_outer_part.jpg
- images/inner_part_with_heat_set_inserts.jpg
mod_version: 1
printer_compatibility:
- V2.4
title: V2.4 handle
Binary file not shown.
Loading

0 comments on commit a1b2419

Please sign in to comment.