Skip to content

Commit 3d5e18c

Browse files
authored
Merge pull request #200 from vintasoftware/feat/migrate-to-codecov
Migrating coveralls to codecov
2 parents 2cf9097 + 3850965 commit 3d5e18c

7 files changed

Lines changed: 274 additions & 414 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,20 @@ jobs:
3737
env:
3838
OPENAI_API_KEY: "sk-fake-test-key-123"
3939

40-
- name: Coveralls Parallel
40+
- name: Generate coverage report
4141
run: |
42-
poetry run coveralls
43-
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
COVERALLS_SERVICE_NAME: "github-actions"
46-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
47-
COVERALLS_FLAG_NAME: django-coverage-${{ matrix.python-version }}
48-
COVERALLS_PARALLEL: true
42+
poetry run coverage xml
43+
44+
- name: Upload coverage to Codecov
45+
uses: codecov/codecov-action@af09b5e394c93991b95a5e7646aeb90c1917f78f # v5.5.1
46+
with:
47+
files: ./coverage.xml
48+
flags: backend-python-${{ matrix.python-version }}
49+
name: backend-python-${{ matrix.python-version }}
50+
token: ${{ secrets.CODECOV_TOKEN }}
4951

5052
build-frontend:
5153
name: Frontend CI
52-
# Wait for Django to finish before starting due to Coveralls parallel
53-
# Source: https://docs.coveralls.io/parallel-builds
54-
needs: build-django
5554

5655
runs-on: ubuntu-latest
5756

@@ -83,40 +82,14 @@ jobs:
8382
- name: Run tests
8483
working-directory: ./frontend
8584
run: |
86-
pnpm run coveralls
87-
env:
88-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89-
COVERALLS_SERVICE_NAME: "github-actions"
90-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
91-
COVERALLS_FLAG_NAME: node-coverage
92-
COVERALLS_PARALLEL: true
93-
94-
- name: Coveralls Parallel
95-
uses: coverallsapp/github-action@v2
96-
with:
97-
github-token: ${{ secrets.GITHUB_TOKEN }}
98-
parallel: true
99-
flag-name: node-coverage
100-
allow-empty: true
101-
env:
102-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103-
COVERALLS_SERVICE_NAME: "github-actions"
104-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
105-
COVERALLS_FLAG_NAME: node-coverage
106-
COVERALLS_PARALLEL: true
85+
pnpm run coverage
10786
108-
coveralls:
109-
name: Coveralls
110-
111-
# Wait for Django and Frontend to finish before starting due to Coveralls parallel
112-
needs: [build-django, build-frontend]
87+
- name: Upload frontend coverage to Codecov
88+
uses: codecov/codecov-action@af09b5e394c93991b95a5e7646aeb90c1917f78f # v5.5.1
89+
with:
90+
files: ./frontend/coverage/lcov.info
91+
flags: frontend
92+
name: frontend-coverage
93+
token: ${{ secrets.CODECOV_TOKEN }}
11394

114-
runs-on: ubuntu-latest
11595

116-
steps:
117-
- name: Coveralls Finished
118-
uses: coverallsapp/github-action@v2
119-
with:
120-
github-token: ${{ secrets.GITHUB_TOKEN }}
121-
parallel-finished: true
122-
carryforward: "django-coverage-3.10,django-coverage-3.11,django-coverage-3.12,django-coverage-3.13,node-coverage"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![CI](https://github.com/vintasoftware/django-ai-assistant/actions/workflows/ci.yml/badge.svg)](https://github.com/vintasoftware/django-ai-assistant/actions/workflows/ci.yml)
2-
[![Coverage Status](https://coveralls.io/repos/github/vintasoftware/django-ai-assistant/badge.svg?branch=main)](https://coveralls.io/github/vintasoftware/django-ai-assistant?branch=main)
2+
[![codecov](https://codecov.io/gh/vintasoftware/django-ai-assistant/branch/main/graph/badge.svg)](https://codecov.io/gh/vintasoftware/django-ai-assistant)
33
[![Discord Server](https://img.shields.io/discord/1260577482122203206)](https://discord.gg/mqdubnPb)
44

55
# django-ai-assistant

frontend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![CI](https://github.com/vintasoftware/django-ai-assistant/actions/workflows/ci.yml/badge.svg)](https://github.com/vintasoftware/django-ai-assistant/actions/workflows/ci.yml)
2-
[![Coverage Status](https://coveralls.io/repos/github/vintasoftware/django-ai-assistant/badge.svg?branch=main)](https://coveralls.io/github/vintasoftware/django-ai-assistant?branch=main)
2+
[![codecov](https://codecov.io/gh/vintasoftware/django-ai-assistant/branch/main/graph/badge.svg)](https://codecov.io/gh/vintasoftware/django-ai-assistant)
33

44
# django-ai-assistant-client
55

frontend/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"test": "jest",
4848
"test:cov": "jest --coverage",
4949
"test:watch": "jest --watch",
50-
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
50+
"coverage": "jest --coverage",
5151
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
5252
"tsc": "tsc",
5353
"generate-client": "openapi-ts"
@@ -72,7 +72,6 @@
7272
"@typescript-eslint/eslint-plugin": "^7.14.1",
7373
"@typescript-eslint/parser": "^7.14.1",
7474
"@vitejs/plugin-react": "^4.3.1",
75-
"coveralls": "^3.1.1",
7675
"eslint": "^8.57.0",
7776
"eslint-plugin-react": "^7.34.3",
7877
"eslint-plugin-react-hooks": "^4.6.2",

0 commit comments

Comments
 (0)