Skip to content

Commit 77fc969

Browse files
authored
golang workflows for restful (#550)
* go test workflow * dependbot update * target v3 branch * use v3 branch
1 parent 9a7c368 commit 77fc969

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: gomod # See documentation for possible values
9+
target-branch: v3
10+
directory: / # Location of package manifests
11+
schedule:
12+
interval: weekly
13+
14+
- package-ecosystem: github-actions
15+
target-branch: v3
16+
directory: /
17+
schedule:
18+
interval: weekly

.github/workflows/go.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ "v3" ]
6+
pull_request:
7+
branches: [ "v3" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Harden Runner
18+
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
19+
with:
20+
egress-policy: audit
21+
22+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
23+
24+
- name: Set up Go
25+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
26+
with:
27+
go-version: 1.21
28+
29+
- name: Build
30+
run: go build -v ./...
31+
32+
- name: Test
33+
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
34+
35+
- name: Codecov
36+
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1

0 commit comments

Comments
 (0)