Skip to content

Commit

Permalink
Merge pull request #71 from GSA-TTS/go/basic-ci
Browse files Browse the repository at this point in the history
Basic CI for Go CF Driver
  • Loading branch information
zjrgov authored Dec 18, 2024
2 parents f9819e0 + ae11c97 commit bd2d61c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/cf-driver-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: "CF Driver: Go Build & Test"

on: [pull_request]

defaults:
run:
working-directory: runner/cf-driver-go

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: runner/cf-driver-go/go.mod
cache-dependency-path: runner/cf-driver-go/go.sum

- name: Install dependencies
run: go get .

- name: Check formatting
run: test -z "$(gofmt -l .)"

- name: Vet
run: go vet ./...

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

- name: Test
run: go test -v ./...
2 changes: 1 addition & 1 deletion runner/cf-driver-go/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GSA-TTS/gitlab-runner-cloudgov/runner/cf-driver

go 1.23.3
go 1.23

require (
github.com/cloudfoundry/go-cfclient/v3 v3.0.0-alpha.9
Expand Down

0 comments on commit bd2d61c

Please sign in to comment.