Skip to content

Commit

Permalink
Merge pull request #28 from budougumi0617/chore/bumpup-go
Browse files Browse the repository at this point in the history
build: bump up go version
  • Loading branch information
budougumi0617 committed Sep 18, 2024
2 parents c7ce471 + 0e8b07c commit 87b2dcb
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 37 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
# uses: docker://reviewdog/action-golangci-lint:v1 # pre-build docker image
uses: actions/checkout@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
golangci_lint_flags: "--config=.golangci.yml ./..."
fetch-depth: 0
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
50 changes: 20 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
name: test

on:
push:
branches:
- master
branches: ["master"]
pull_request:
name: test
branches: ["master"]

jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest]
env:
PIXELA_USER: ${{ secrets.PIXELA_USER }}
PIXELA_TOKEN: ${{ secrets.PIXELA_TOKEN }}
runs-on: ${{ matrix.platform }}
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v2
with:
go-version: '^1.15' # The Go version to download (if necessary) and use.
- name: Checkout code
uses: actions/checkout@v2
- name: Use Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Modules
if: steps.cache.outputs.cache-hit != 'true'
run: go mod download
- name: Run tests
run: go test -v -covermode=atomic
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- name: Install dependencies
run: |
go get .
- name: Test
run: go test ./... -race -coverprofile=coverage.out -covermode=atomic
- name: Run octocov
uses: k1LoW/octocov-action@v1
22 changes: 22 additions & 0 deletions .octocov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# generated by octocov init
coverage:
if: true
codeToTestRatio:
code:
- "**/*.go"
- "!**/*_test.go"
test:
- "**/*_test.go"
testExecutionTime:
if: true
diff:
datastores:
- artifact://${GITHUB_REPOSITORY}
comment:
if: is_pull_request
summary:
if: true
report:
if: is_default_branch
datastores:
- artifact://${GITHUB_REPOSITORY}
7 changes: 6 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
module github.com/budougumi0617/nrseg

go 1.15
go 1.23

require (
github.com/google/go-cmp v0.5.4
golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c
)

require (
golang.org/x/mod v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
)

0 comments on commit 87b2dcb

Please sign in to comment.