aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2025-06-05 01:20:11 +0300
committerValentin Popov <valentin@popov.link>2025-06-05 01:20:11 +0300
commit711a5a03481fd30c3daca4c8469f47264a2b3921 (patch)
tree1116b640fcdbc9236593561790ec6638ed1afc0f /.github
parent949d77e2cfc3ad530a5358c4054d8751df57735c (diff)
downloadgo-metatrader4-711a5a03481fd30c3daca4c8469f47264a2b3921.tar.xz
go-metatrader4-711a5a03481fd30c3daca4c8469f47264a2b3921.zip
Integrate Codecov service
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml76
1 files changed, 40 insertions, 36 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bc5e2ce..25f99b3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,9 +2,9 @@ name: CI
on:
push:
- branches: [ master ]
+ branches: [master]
pull_request:
- branches: [ master ]
+ branches: [master]
permissions:
contents: read
@@ -14,42 +14,46 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- - name: Check out code
- uses: actions/checkout@v4
- - name: Set up Go
- uses: actions/setup-go@v5
- with:
- go-version: '1.24.3'
- - name: Cache Go modules
- uses: actions/cache@v4
- with:
- path: |
- ~/.cache/go-build
- ~/go/pkg/mod
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go-
- - name: Download dependencies
- run: go mod download
- - name: Verify dependencies
- run: go mod verify
- - name: Run go vet
- run: go vet ./...
- - name: Run tests
- run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
+ - name: Check out code
+ uses: actions/checkout@v4
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: "1.24.3"
+ - name: Cache Go modules
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cache/go-build
+ ~/go/pkg/mod
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+ restore-keys: |
+ ${{ runner.os }}-go-
+ - name: Download dependencies
+ run: go mod download
+ - name: Verify dependencies
+ run: go mod verify
+ - name: Run go vet
+ run: go vet ./...
+ - name: Run tests
+ run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
+ - name: Upload coverage reports
+ uses: codecov/codecov-action@v5
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- - name: Check out code
- uses: actions/checkout@v4
- - name: Set up Go
- uses: actions/setup-go@v5
- with:
- go-version: '1.24.3'
- - name: Run golangci-lint
- uses: golangci/golangci-lint-action@v8
- with:
- version: latest
- args: --timeout=5m \ No newline at end of file
+ - name: Check out code
+ uses: actions/checkout@v4
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: "1.24.3"
+ - name: Run golangci-lint
+ uses: golangci/golangci-lint-action@v8
+ with:
+ version: latest
+ args: --timeout=5m