From 21fdda829f56e14e188465636a53d51995153cdf Mon Sep 17 00:00:00 2001 From: John Behm Date: Sun, 22 Oct 2023 16:20:21 +0200 Subject: [PATCH] update ci pipeline --- .github/dependabot.yaml | 15 +++++++++++++++ .github/workflows/main.yaml | 30 ++++++++++++++++++++++++++++++ .github/workflows/main.yml | 25 ------------------------- go.mod | 2 +- 4 files changed, 46 insertions(+), 26 deletions(-) create mode 100644 .github/dependabot.yaml create mode 100644 .github/workflows/main.yaml delete mode 100644 .github/workflows/main.yml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..24561af --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,15 @@ +version: 2 +updates: +- package-ecosystem: gomod + directory: / + schedule: + interval: weekly + reviewers: + - "jxsl13" + +- package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + reviewers: + - "jxsl13" \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..7f7537a --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,30 @@ +on: [push, pull_request] +name: Test +jobs: + test: + strategy: + matrix: + go-version: [stable, oldstable] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v4 + + - name: Vet + run: go vet ./... + + - name: Code Coverage + run: go test ./... -timeout 30s -race -count=1 -covermode=atomic -coverprofile=coverage.out + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.out + fail_ci_if_error: false + verbose: false \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 1e2f6d3..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,25 +0,0 @@ -on: [push, pull_request] -name: Test -jobs: - test: - strategy: - matrix: - go-version: [1.19] - platform: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.platform }} - steps: - - name: Install Go - uses: actions/setup-go@v1 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v2 - - name: Test - run: go test ./... - - name: Code Coverage - run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.txt diff --git a/go.mod b/go.mod index dc45646..fed52f1 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/jxsl13/twapi -go 1.19 +go 1.21 require ( github.com/reiver/go-telnet v0.0.0-20180421082511-9ff0b2ab096e