From 69c65d4d1f5b8a49070911a6cc5b8793c0ba3dc6 Mon Sep 17 00:00:00 2001 From: mxmCherry Date: Sun, 4 Aug 2024 18:03:18 +0300 Subject: [PATCH] ci: simplify github actions workflow --- .github/workflows/go.yml | 19 +++++++++++++++++++ .github/workflows/test.yml | 31 ------------------------------- README.md | 2 +- 3 files changed, 20 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/go.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..33361e3 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,19 @@ +name: Go + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.x' + - name: Test + run: go test -v ./... diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 4391676..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Test -on: - push: - branches: - - main - pull_request: - branches: - - main -jobs: - unit: - runs-on: ubuntu-latest - strategy: - matrix: - go-version: - - 1.x # latest stable version - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - - name: Run tests - run: go test ./... diff --git a/README.md b/README.md index c068ccf..f07c138 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # movavg [![Go Reference](https://pkg.go.dev/badge/github.com/mxmCherry/movavg.svg)](https://pkg.go.dev/github.com/mxmCherry/movavg) -[![Test](https://github.com/mxmCherry/movavg/actions/workflows/test.yml/badge.svg)](https://github.com/mxmCherry/movavg/actions/workflows/test.yml) +[![Test](https://github.com/mxmCherry/movavg/actions/workflows/go.yml/badge.svg)](https://github.com/mxmCherry/movavg/actions/workflows/go.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/mxmCherry/movavg)](https://goreportcard.com/report/github.com/mxmCherry/movavg) [Moving Average](https://en.wikipedia.org/wiki/Moving_average) calculator for Go (Golang) with focus on performance.