{"id":26562621,"url":"https://github.com/mvahaste/unit-ci-testing","last_synced_at":"2026-05-06T20:39:26.238Z","repository":{"id":283133997,"uuid":"950797808","full_name":"mvahaste/unit-ci-testing","owner":"mvahaste","description":"📝 Learning unit testing \u0026 CI pipelines","archived":false,"fork":false,"pushed_at":"2025-03-18T18:28:48.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T18:48:41.875Z","etag":null,"topics":["ci","cicd","fastapi","python","testing","unittest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvahaste.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-18T17:44:09.000Z","updated_at":"2025-03-18T18:28:52.000Z","dependencies_parsed_at":"2025-03-18T18:48:45.196Z","dependency_job_id":"bd99b5f5-21ed-4bda-b99e-59fe66f0d14b","html_url":"https://github.com/mvahaste/unit-ci-testing","commit_stats":null,"previous_names":["mvahaste/unit-ci-testing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvahaste%2Funit-ci-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvahaste%2Funit-ci-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvahaste%2Funit-ci-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvahaste%2Funit-ci-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvahaste","download_url":"https://codeload.github.com/mvahaste/unit-ci-testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244973810,"owners_count":20541025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","cicd","fastapi","python","testing","unittest"],"created_at":"2025-03-22T15:18:21.291Z","updated_at":"2026-05-06T20:39:21.208Z","avatar_url":"https://github.com/mvahaste.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📝 Learning Unit Testing \u0026 CI Pipelines\n\nThis project is a simple FastAPI-based application designed to manage a todo list. I made it to learn FastAPI, testing with pytest, and integrating GitHub Actions for continuous integration (CI).\n\n# Table of contents\n\n1.  [🎨 Features](#-features)\n2.  [🗂️ Application Structure](#-application-structure)\n3.  [⚙️ Installation](#-installation)\n4.  [📡 Endpoints](#-endpoints)\n5.  [🧪 Testing](#-testing)\n6.  [🚀 GitHub Actions](#-github-actions)\n\n## 🎨 Features\n\n- **Create a Todo**: Add a new todo item with a title and optional description.\n- **Read Todos**: View all todos or a specific todo by its ID.\n- **Update a Todo**: Modify the title or description of an existing todo.\n- **Delete a Todo**: Remove a todo from the list.\n- **Error Handling**: The app provides error responses when a resource is not found or when required data is missing.\n\n## 🗂️ Application Structure\n\n- `app/main.py`: Contains the FastAPI application and its routes.\n- `tests/test_main.py`: Contains tests for the application using `pytest` and FastAPI's test client.\n\n## ⚙️ Installation\n\nTo run the project locally, follow these steps:\n\n1. Clone the repository:\n\n```\ngit clone https://github.com/mvahaste/unit-ci-testing\ncd unit-ci-testing\n```\n\n2. Create a virtual environment (optional but recommended):\n\n```\npython3 -m venv venv\nsource venv/bin/activate\n```\n\n3. Install the dependencies:\n\n```\npython3 -m pip install -r requirements.txt\n```\n\n4. Run the application:\n\n```\nuvicorn app.main:app --reload\n```\n\nYour FastAPI app will be running at http://127.0.0.1:8000.\n\n## 📡 Endpoints\n\n- GET /: Returns a greeting message.\n- GET /todos: Returns all todos.\n- GET /todos/{todo_id}: Returns a specific todo by ID.\n- POST /todos: Creates a new todo.\n- PUT /todos/{todo_id}: Updates an existing todo.\n- DELETE /todos/{todo_id}: Deletes a todo by ID.\n\n## 🧪 Testing\n\nThis project includes tests to ensure the functionality of the application. Tests are written using pytest and FastAPI’s test client.\n\nTo run the tests, use the following command:\n\n```\npytest -v --tb=short --disable-warnings\n```\n\n## 🚀 GitHub Actions\n\nThis project includes GitHub Actions for continuous integration.\n\nIt automatically runs tests whenever changes are pushed to the repository, generates a test report with `pytest-md` and `pytest-emoji`, and adds it to the job summary. The `main` branch also has protections on it, which require all tests to pass before accepting a pull request.\n\n### Example\n\n![Example job summary image](job-summary.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvahaste%2Funit-ci-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvahaste%2Funit-ci-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvahaste%2Funit-ci-testing/lists"}