feat: initial release of local-code-interpreter skill #1
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| smoke-test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install matplotlib numpy | |
| - name: Test basic execution | |
| run: | | |
| python3 scripts/run.py --code "print('hello world')" --no-header | |
| - name: Test math | |
| run: | | |
| python3 scripts/run.py --code " | |
| import math | |
| data = list(range(1, 11)) | |
| mean = sum(data) / len(data) | |
| std = math.sqrt(sum((x-mean)**2 for x in data) / len(data)) | |
| print(f'mean={mean}, std={std:.4f}') | |
| " --no-header | |
| - name: Test matplotlib (non-interactive) | |
| run: | | |
| python3 scripts/run.py --code " | |
| import matplotlib | |
| matplotlib.use('Agg') | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| x = np.linspace(0, 2*3.14159, 50) | |
| plt.plot(x, np.sin(x)) | |
| plt.savefig('/tmp/test_chart.png', dpi=72) | |
| print('chart ok') | |
| " --no-header | |
| - name: Test file execution | |
| run: | | |
| echo "print('file exec ok')" > /tmp/test_file.py | |
| python3 scripts/run.py --file /tmp/test_file.py --no-header | |
| - name: Test error handling | |
| run: | | |
| python3 scripts/run.py --code "raise ValueError('intentional error')" && exit 1 || echo "Error correctly propagated" |