-
Notifications
You must be signed in to change notification settings - Fork 15
66 lines (51 loc) · 1.61 KB
/
ci.yml
File metadata and controls
66 lines (51 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pdm install --dev
- name: Run tests
run: pdm run python -m pytest --verbose
- name: Run linting
run: pdm run ruff check .
- name: Run type checking
run: pdm run ty check src
docker:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t repomix:test .
- name: Test Docker image
run: |
# Create test directory
mkdir -p /tmp/test-repo
echo "print('Hello, World!')" > /tmp/test-repo/test.py
echo "# Test Project" > /tmp/test-repo/README.md
# Test basic functionality
docker run --rm -v /tmp/test-repo:/app repomix:test --version
docker run --rm -v /tmp/test-repo:/app repomix:test --help
docker run --rm -v /tmp/test-repo:/app repomix:test --output test-output.md
# Verify output file was created
ls -la /tmp/test-repo/test-output.md