Skip to content

Commit e6899e5

Browse files
author
Vitaly
authored
Add codeCov (hexlet-codebattle#585)
1 parent 6aa57fb commit e6899e5

8 files changed

Lines changed: 1710 additions & 22 deletions

File tree

.github/workflows/tests_run_on_PR.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,17 @@ jobs:
8282
run: yarn lint
8383
working-directory: ./services/app
8484

85+
- name: Setup db
86+
run: mix ecto.create && mix ecto.migrate
87+
working-directory: ./services/app
88+
env:
89+
MIX_ENV: test
90+
8591
- run: make test
8692

93+
- name: Codecov
94+
run: ./.codecov.bash
95+
working-directory: ./services/app
96+
env:
97+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
98+

.github/workflows/tests_run_on_push.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@ jobs:
4747
restore-keys: |
4848
${{ runner.os }}-mix-
4949

50-
- uses: actions/cache@v1
51-
with:
52-
path: /var/lib/docker/overlay2
53-
key: ${{ runner.os }}-dockers-${{ hashFiles(format('{0}{1}', github.workspace, '/.github/workflows/tests_run_on_push.yml')) }}
54-
restore-keys: |
55-
${{ runner.os }}-dockers-
56-
5750
- name: Get deps
5851
run: mix deps.get
5952
working-directory: ./services/app
@@ -89,11 +82,20 @@ jobs:
8982
run: yarn lint
9083
working-directory: ./services/app
9184

92-
- name: Run app tests
93-
run: make test
85+
- name: Setup db
86+
run: mix ecto.create && mix ecto.migrate
87+
working-directory: ./services/app
9488
env:
9589
MIX_ENV: test
9690

91+
- run: make test
92+
93+
- name: Codecov
94+
run: ./.codecov.bash
95+
working-directory: ./services/app
96+
env:
97+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
98+
9799
- name: Pull dockers
98100
run: |
99101
docker pull codebattle/js:11.6.0

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Codebattle
22

3-
![](https://github.com/hexlet-codebattle/codebattle/workflows/Build%20master/badge.svg)
3+
[![Actions Status](https://github.com/hexlet-codebattle/codebattle/workflows/Build%20master/badge.svg)](https://github.com/hexlet-codebattle/codebattle/actions)
4+
[![codecov](https://codecov.io/gh/hexlet-codebattle/codebattle/branch/master/graph/badge.svg)](https://codecov.io/gh/hexlet-codebattle/codebattle)
5+
[![Maintainability](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/hexlet-codebattle/codebattle/maintainability)
46

57
Кодбатл - это игра с открытым исходным кодом, которая разрабатывается сообществом Хекслета. Подробнее о проекте читайте в [вики репозитория](https://github.com/hexlet-codebattle/codebattle/wiki). Мы будем очень рады, если вы решите [принять участие в разработке проекта](https://github.com/hexlet-codebattle/codebattle/blob/master/CONTRIBUTING.md).
68
Текущая версия приложения доступна по адресу [codebattle.hexlet.io](https://codebattle.hexlet.io).

0 commit comments

Comments
 (0)