-
Notifications
You must be signed in to change notification settings - Fork 0
Cantis/issue4 #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
576d005
Faction Setting & Mode
cantis b92c884
Add comprehensive integration and unit tests for force and lance temp…
cantis 8e0580e
refactor: Enhance testing documentation and structure for clarity and…
cantis faab1be
fix: Update in-memory database configuration for shared cache mode
cantis 568c086
feat: Implement unique ID generation logic and update add form to pre…
cantis e843be0
chore: Bump version to 1.0.1 in pyproject.toml and uv.lock
cantis bb0ed95
Update app/templates/miniatures/add.html
cantis 301e3c0
feat: Preserve filter state in add and edit forms, and enhance list v…
cantis 1c6b71e
feat: Add deactivate-all route and button, enhance filter state handl…
cantis ddd294e
feat: Enhance dropdown functionality and improve table responsiveness…
cantis 505433e
feat: Add Docker support with Gunicorn, configure database paths, and…
cantis 1adf524
feat: Add GitHub Actions workflow for unit, integration, and parallel…
cantis 42a3e0f
refactor: Improve error handling and messaging in miniatures and forc…
cantis 685dcda
Update app/templates/miniatures/add.html
cantis 2590d0e
Update app/templates/miniatures/edit.html
cantis 327d87c
Update app/__init__.py
cantis 9e026af
fix: Correct syntax error in JavaScript for prefill check in add mini…
cantis 81b3b14
fix: Correct JavaScript syntax for prefill check in add miniature form
cantis 648c404
Merge branch 'cantis/issue4' of https://github.com/cantis/MechBay int…
cantis 12fbefb
fix: Update ProxyFix configuration and improve JSON handling in edit …
cantis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| name: Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, develop, "cantis/**"] | ||
| pull_request: | ||
| branches: [main, develop] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| unit-tests: | ||
| name: Unit Tests | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
| python-version: ["3.14"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| version: "latest" | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| run: uv python install ${{ matrix.python-version }} | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync | ||
|
|
||
| - name: Run unit tests | ||
| run: uv run pytest tests/*_unit.py -v --tb=short | ||
|
|
||
| - name: Upload test results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: unit-test-results-${{ matrix.os }} | ||
| path: | | ||
| .pytest_cache/ | ||
| test-results.xml | ||
| retention-days: 7 | ||
|
|
||
| integration-tests: | ||
| name: Integration Tests | ||
| runs-on: ubuntu-latest | ||
| needs: unit-tests | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| version: "latest" | ||
|
|
||
| - name: Set up Python 3.14 | ||
| run: uv python install 3.14 | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync | ||
|
|
||
| - name: Run integration tests | ||
| run: uv run pytest tests/*_integration.py -v --tb=short -m slow | ||
|
|
||
| - name: Upload test results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: integration-test-results | ||
| path: | | ||
| .pytest_cache/ | ||
| test-results.xml | ||
| retention-days: 7 | ||
|
|
||
| parallel-tests: | ||
| name: Parallel Test Suite | ||
| runs-on: ubuntu-latest | ||
| needs: [unit-tests, integration-tests] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| version: "latest" | ||
|
|
||
| - name: Set up Python 3.14 | ||
| run: uv python install 3.14 | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync | ||
|
|
||
| - name: Run all tests in parallel | ||
| run: uv run pytest tests/ -n auto --tb=short --dist=loadgroup | ||
|
|
||
| - name: Upload test results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: parallel-test-results | ||
| path: | | ||
| .pytest_cache/ | ||
| test-results.xml | ||
| retention-days: 7 | ||
|
|
||
| - name: Generate test summary | ||
| if: always() | ||
| run: | | ||
| echo "## Test Results" >> $GITHUB_STEP_SUMMARY | ||
| echo "Parallel test execution completed" >> $GITHUB_STEP_SUMMARY | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| FROM python:3.13-slim | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Install system dependencies | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| curl \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install uv | ||
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv | ||
|
|
||
| # Copy dependency files | ||
| COPY pyproject.toml uv.lock ./ | ||
|
|
||
| # Install dependencies | ||
| RUN uv sync --frozen --no-dev | ||
|
|
||
| # Copy application code | ||
| COPY . . | ||
|
|
||
| # Create data directory | ||
| RUN mkdir -p /data | ||
|
|
||
| # Expose port | ||
| EXPOSE 5000 | ||
|
|
||
| # Set environment variables | ||
| ENV PYTHONPATH=/app | ||
| ENV FLASK_APP=server.py | ||
|
|
||
| # Copy and set entrypoint | ||
| COPY scripts/entrypoint.sh /entrypoint.sh | ||
| RUN chmod +x /entrypoint.sh | ||
|
|
||
| ENTRYPOINT ["/entrypoint.sh"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow is named
tests.yml.off, so GitHub Actions will ignore it. If the intent is to add CI coverage for the new test suite, the file needs to be namedtests.yml(or similar) under.github/workflows/to actually run.