Merge pull request #1987 from RAMilewski/master #2432
This file contains hidden or 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: Checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| jobs: | |
| Regressions: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Required Libraries | |
| run: sudo apt-get install libfuse2 | |
| - name: Install OpenSCAD | |
| run: | | |
| cd $GITHUB_WORKSPACE | |
| wget -q https://github.com/openscad/openscad/releases/download/openscad-2021.01/OpenSCAD-2021.01-x86_64.AppImage | |
| sudo mv OpenSCAD-2021.01*-x86_64.AppImage /usr/local/bin/openscad | |
| sudo chmod +x /usr/local/bin/openscad | |
| - name: Install openscad-test | |
| run: pip install openscad-test | |
| - name: Run Regression Tests | |
| run: | | |
| cd $GITHUB_WORKSPACE | |
| ./scripts/run_tests.sh | |
| FuncCoverage: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check Function Test Coverage | |
| run: | | |
| cd $GITHUB_WORKSPACE | |
| OUTPUT=$(python3 scripts/func_coverage.py) | |
| echo "$OUTPUT" | |
| # Extract coverage percentage | |
| COVERAGE=$(echo "$OUTPUT" | grep "Total coverage:" | grep -oP '[0-9]+\.[0-9]+(?=%)') | |
| echo "Coverage: ${COVERAGE}%" | |
| # Fail if coverage dropped below 99% | |
| python3 -c " | |
| coverage = float('${COVERAGE}') | |
| if coverage < 99.0: | |
| print(f'::error::Function test coverage dropped to {coverage}% (minimum: 99%)') | |
| exit(1) | |
| else: | |
| print(f'Coverage OK: {coverage}%') | |
| " | |
| CheckTutorials: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Clone Wiki | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: BelfrySCAD/BOSL2.wiki | |
| path: BOSL2.wiki | |
| - name: Apt Update | |
| run: sudo apt update | |
| - name: Install Required Libraries | |
| run: sudo apt-get install python3-pip python3-dev python3-setuptools python3-pil libfuse2 | |
| - name: Install OpenSCAD-DocsGen package. | |
| run: sudo pip3 install openscad-docsgen imageio | |
| - name: Install OpenSCAD | |
| run: | | |
| cd $GITHUB_WORKSPACE | |
| wget -q https://github.com/openscad/openscad/releases/download/openscad-2021.01/OpenSCAD-2021.01-x86_64.AppImage | |
| sudo mv OpenSCAD-2021.01*-x86_64.AppImage /usr/local/bin/openscad | |
| sudo chmod +x /usr/local/bin/openscad | |
| - name: Tabs Check | |
| run: | | |
| cd $GITHUB_WORKSPACE | |
| echo "::add-matcher::.github/check_for_tabs.json" | |
| ./scripts/check_for_tabs.sh | |
| - name: Checking Tutorials | |
| run: | | |
| cd $GITHUB_WORKSPACE | |
| echo "::add-matcher::.github/openscad_docsgen.json" | |
| export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE) | |
| openscad-mdimggen -T | |
| CheckDocs: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Clone Wiki | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: BelfrySCAD/BOSL2.wiki | |
| path: BOSL2.wiki | |
| - name: Apt Update | |
| run: sudo apt update | |
| - name: Install Required Libraries | |
| run: sudo apt-get install python3-pip python3-dev python3-setuptools python3-pil libfuse2 | |
| - name: Install OpenSCAD-DocsGen package. | |
| run: sudo pip3 install openscad-docsgen imageio | |
| - name: Install OpenSCAD | |
| run: | | |
| cd $GITHUB_WORKSPACE | |
| wget -q https://github.com/openscad/openscad/releases/download/openscad-2021.01/OpenSCAD-2021.01-x86_64.AppImage | |
| sudo mv OpenSCAD-2021.01*-x86_64.AppImage /usr/local/bin/openscad | |
| sudo chmod +x /usr/local/bin/openscad | |
| - name: Checking Docs | |
| run: | | |
| cd $GITHUB_WORKSPACE | |
| echo "::add-matcher::.github/openscad_docsgen.json" | |
| export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE) | |
| openscad-docsgen -Tmf |