Skip to content

Commit

Permalink
golang workflows for restful (#550)
Browse files Browse the repository at this point in the history
* go test workflow

* dependbot update

* target v3 branch

* use v3 branch
  • Loading branch information
haitch committed May 28, 2024
1 parent 9a7c368 commit 77fc969
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: gomod # See documentation for possible values
target-branch: v3
directory: / # Location of package manifests
schedule:
interval: weekly

- package-ecosystem: github-actions
target-branch: v3
directory: /
schedule:
interval: weekly
36 changes: 36 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Go

on:
push:
branches: [ "v3" ]
pull_request:
branches: [ "v3" ]

permissions:
contents: read

jobs:

build:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit

- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 1.21

- name: Build
run: go build -v ./...

- name: Test
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...

- name: Codecov
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1

0 comments on commit 77fc969

Please sign in to comment.