Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
EficodeRjpalt committed Jan 22, 2025
1 parent 0d65300 commit 1aeb91e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Python Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
pytest tests/
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Welcome to the TDD Tetris project. This repository demonstrates how to build a s
7. First 5 Test Cases
8. Next Features to Implement
9. Using TDD with Copilot
10. Contributing
10. Continuous Integration

---

Expand Down Expand Up @@ -138,3 +138,29 @@ Example flow:
- In board.py, implement the Board class with the required attributes.
- Re-run tests until the failure is resolved.
- Move to the next test.

---

## 10. Continuous Integration

[![Python Tests](https://github.com/[your-username]/tdd-tetris/actions/workflows/CI.yml/badge.svg)](https://github.com/[your-username]/tdd-tetris/actions/workflows/CI.yml)

This project uses GitHub Actions for continuous integration. The pipeline:

- Triggers on pushes to `main` and pull requests
- Runs on Ubuntu latest
- Sets up Python 3.13
- Installs project dependencies
- Runs all tests in the `tests/` directory

To see the pipeline status, click the badge above or check the Actions tab in the repository.

### Prerequisites
- Python 3.13
- pip package manager
- pytest

### Local Setup
```bash
python -m pip install -r requirements.txt
pytest tests/

0 comments on commit 1aeb91e

Please sign in to comment.