Skip to content

Commit

Permalink
Merge pull request #47 from gotoeveryone/deps/actions
Browse files Browse the repository at this point in the history
Actions のバージョンアップ
  • Loading branch information
gotoeveryone authored Aug 4, 2024
2 parents bf1e8f6 + 166c239 commit fbe3d50
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 40 deletions.
36 changes: 9 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,29 @@ jobs:
code_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Golang
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.20"

- name: Use Cache
uses: actions/cache@v3
id: app_cache
with:
path: ~/go/pkg/mod
key: ${{ runner.OS }}-${{ hashFiles('**/go.sum') }}

- name: Install dependencies
if: steps.app_cache.outputs.cache-hit != 'true'
run: go mod download
cache-dependency-path: |
**/go.sum
- name: Execute code check
run: go vet ./...

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Golang
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.20"
cache-dependency-path: |
**/go.sum
- name: Use Cache
uses: actions/cache@v3
id: app_cache
with:
path: ~/go/pkg/mod
key: ${{ runner.OS }}-${{ hashFiles('**/go.sum') }}

- name: Install dependencies
if: steps.app_cache.outputs.cache-hit != 'true'
run: go mod download

- name: Execute code check
- name: Execute test
run: go test ./...
17 changes: 4 additions & 13 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,16 @@ jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: main

- name: Set up Golang
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.20"

- name: Use Cache
uses: actions/cache@v3
id: app_cache
with:
path: ~/go/pkg/mod
key: ${{ runner.OS }}-${{ hashFiles('**/go.sum') }}

- name: Install dependencies
if: steps.app_cache.outputs.cache-hit != 'true'
run: go mod download
cache-dependency-path: |
**/go.sum
- name: Execute
env:
Expand Down

0 comments on commit fbe3d50

Please sign in to comment.