Skip to content

Commit

Permalink
added go 1.20 and github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
KenWilliamson committed Apr 12, 2023
1 parent aebd75a commit 436875f
Show file tree
Hide file tree
Showing 11 changed files with 1,985 additions and 2,054 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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: Build

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

jobs:

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

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.1

- name: Install dependencies
run: go get .

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

- name: Test
run: go test -v ./...

# - name: Build the Docker image
# run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)

sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}




42 changes: 42 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.

name: Publish Docker image

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ulboralabs/six910

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## [Swagger API Docs](http://api-swagger-docs.six910.com/swagger/index.html)

[![Build Status](https://travis-ci.com/Ulbora/Six910.svg?branch=master)](https://travis-ci.com/Ulbora/Six910)
[![GitHub Actions Build](https://github.com/Ulbora/Six910/actions/workflows/build.yml/badge.svg)](https://github.com/Ulbora/Six910/actions/workflows/build.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Six910&metric=alert_status)](https://sonarcloud.io/dashboard?id=Six910)
[![Go Report Card](https://goreportcard.com/badge/github.com/Ulbora/Six910)](https://goreportcard.com/report/github.com/Ulbora/Six910)

Expand Down
7 changes: 1 addition & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Ulbora/Six910

go 1.18
go 1.20

require (
github.com/Ulbora/GoAuth2JwtValidator v1.0.2
Expand All @@ -19,9 +19,6 @@ require (

require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/go-chi/chi v4.1.2+incompatible // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/spec v0.20.6 // indirect
Expand All @@ -32,10 +29,8 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/rogpeppe/go-internal v1.8.0 // indirect
github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
golang.org/x/sys v0.0.0-20220727055044-e65921a090b8 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.12 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
147 changes: 1 addition & 146 deletions go.sum

Large diffs are not rendered by default.

2,552 changes: 1,276 additions & 1,276 deletions handlers/coverage.out

Large diffs are not rendered by default.

1,224 changes: 612 additions & 612 deletions managers/coverage.out

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions nbproject/project.properties

This file was deleted.

9 changes: 0 additions & 9 deletions nbproject/project.xml

This file was deleted.

2 changes: 1 addition & 1 deletion prodsort/coverage.out
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
mode: set
github.com/Ulbora/Six910/prodsort/alphaNumSort.go:9.36,12.2 2 1
github.com/Ulbora/Six910/prodsort/alphaNumSort.go:15.45,20.13 4 1
github.com/Ulbora/Six910/prodsort/alphaNumSort.go:23.2,23.12 1 1
github.com/Ulbora/Six910/prodsort/alphaNumSort.go:20.13,22.3 1 1
github.com/Ulbora/Six910/prodsort/alphaNumSort.go:23.2,23.12 1 1
github.com/Ulbora/Six910/prodsort/alphaNumSort.go:26.27,180.2 123 1
github.com/Ulbora/Six910/prodsort/prodSizeSort.go:13.36,15.2 1 1
github.com/Ulbora/Six910/prodsort/prodSizeSort.go:18.41,20.2 1 1
Expand Down
Binary file modified server
Binary file not shown.

0 comments on commit 436875f

Please sign in to comment.