Skip to content

Commit 056c8f0

Browse files
author
RSOrokin
committed
ci
1 parent b4f679d commit 056c8f0

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [ main, develop ]
66
pull_request:
7-
# Запускается для ЛЮБОГО pull request, независимо от целевой ветки
87
branches: [ '**' ]
98

109
jobs:
@@ -13,14 +12,12 @@ jobs:
1312
runs-on: ubuntu-latest
1413
strategy:
1514
matrix:
16-
# Оптимальный набор версий: последняя стабильная + 1 предыдущая
1715
go-version: ['1.22', '1.23']
1816

1917
steps:
2018
- name: Checkout code
2119
uses: actions/checkout@v4
2220
with:
23-
# Важно для pull_request событий
2421
fetch-depth: 0
2522

2623
- name: Set up Go
@@ -44,11 +41,12 @@ jobs:
4441
- name: Run tests
4542
run: go test -v -race -coverprofile=coverage.out ./pkg/...
4643

47-
- name: Upload coverage
48-
uses: codecov/codecov-action@v4
49-
if: matrix.go-version == '1.23' && github.event_name == 'pull_request'
44+
- name: Upload coverage to Codecov
45+
uses: codecov/codecov-action@v5
46+
if: matrix.go-version == '1.23'
5047
with:
51-
file: ./coverage.out
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
files: coverage.out
5250
fail_ci_if_error: false
5351

5452
lint:

0 commit comments

Comments
 (0)