diff options
author | Valentin Popov <valentin@popov.link> | 2025-06-04 12:09:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-04 12:09:26 +0300 |
commit | b57c1a6878190abd6ed63e285e13b03a4fbac7a3 (patch) | |
tree | 32d143bd87bfb182c2035c6be09c6ee3b035f903 /.github | |
parent | 7240595478fedec02e9e47c704976cf56a66d3e8 (diff) | |
download | go-metatrader4-b57c1a6878190abd6ed63e285e13b03a4fbac7a3.tar.xz go-metatrader4-b57c1a6878190abd6ed63e285e13b03a4fbac7a3.zip |
Added GitHub Actions (#4)
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..07e7b97 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + 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.2' + - 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 ./... + + 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.2' + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v8 + with: + version: latest + args: --timeout=5m
\ No newline at end of file |