Skip to content

Commit 6d7cb3b

Browse files
committed
chore: update Makefile and CONTRIBUTING.md
1 parent 6c3cde0 commit 6d7cb3b

3 files changed

Lines changed: 16 additions & 26 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,26 @@ jobs:
3232
with:
3333
python-version-file: ".python-version"
3434

35-
- name: Build the project
35+
- name: Build Docker image
3636
run: |
37-
docker compose build sqlnotify
37+
docker build -t sqlnotify:ci .
3838
39-
- name: Run tests
40-
run: make test
39+
- name: Run tests and collect coverage inside Docker
40+
run: |
41+
# Create a directory to store the coverage reports
42+
mkdir -p coverage_output
43+
44+
# Run the container and generate both XML and lcov coverage reports
45+
docker run --rm \
46+
-v "${{ github.workspace }}/coverage_output":/app/coverage_output \
47+
sqlnotify:ci \
48+
bash -lc "pytest --cov=sqlnotify --cov-report=xml:/app/coverage_output/coverage.xml --cov-report=lcov:/app/coverage_output/lcov.info"
4149
4250
- name: Upload coverage to Codecov
43-
run: make coverage
51+
uses: codecov/codecov-action@v4
52+
with:
53+
files: ./coverage_output/coverage.xml
54+
fail_ci_if_error: true
4455
env:
4556
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4657

CONTRIBUTING.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,6 @@ make test
4949

5050
# Or directly with pytest
5151
uv run pytest
52-
53-
# With coverage report
54-
make test_coverage
55-
```
56-
57-
### Run specific test files
58-
59-
```bash
60-
# SQLite tests
61-
make test_sqlite
62-
63-
# PostgreSQL tests
64-
make test_postgres
6552
```
6653

6754
## Code Style

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ publish:
1616
@echo "Published successfully"
1717

1818

19-
GIT_SHA := $(shell git rev-parse HEAD 2>/dev/null || :)
20-
21-
coverage:
22-
@echo "Running coverage (inside Docker)..."
23-
@docker compose run --remove-orphans sqlnotify bash -c "$(UV) run pytest --cov=sqlnotify --cov-report=xml && if [ -n '$(GIT_SHA)' ]; then $(CODECOV_CLI) upload-process -t $(CODECOV_TOKEN) -f coverage.xml -C $(GIT_SHA); else echo 'Skipping codecov upload: missing git commit sha'; fi"
24-
@echo "Coverage report generated at coverage.xml"
25-
26-
2719
release: build
2820
@echo "Running release script..."
2921
@bash scripts/release.sh $(ARGS)

0 commit comments

Comments
 (0)