Skip to content

Commit

Permalink
#114 Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Jan 29, 2024
2 parents 8d61a3a + a8e14d5 commit 383e499
Show file tree
Hide file tree
Showing 22 changed files with 149 additions and 125 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Default code owner

* @senzing-garage/senzing-go-developers

/.github/ @senzing-garage/senzing-devsecops
20 changes: 0 additions & 20 deletions .github/workflows/add-label-customer-submission.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/add-label-triage.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/add-labels-standardized.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'add labels standardized'

on:
issues:
types:
- opened
- reopened

jobs:
add-issue-labels:
permissions:
issues: write
secrets:
ORG_MEMBERSHIP_TOKEN: ${{ secrets.ORG_MEMBERSHIP_TOKEN }}
SENZING_MEMBERS: ${{ secrets.SENZING_MEMBERS }}
uses: senzing-factory/build-resources/.github/workflows/add-labels-to-issue.yaml@v1
29 changes: 11 additions & 18 deletions .github/workflows/add-to-project-garage-dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
name: add-to-project-garage-dependabot.yaml
name: 'add to project garage dependabot'

on:
pull_request:
types:
- opened
- reopened
env:
CREATOR: ${{ github.event.pull_request.user.login }}
branches: [main]

jobs:
add-to-project:
name: Add dependabot pull request to project
runs-on: ubuntu-latest
steps:
- name: Assign pull request to project
env:
BOOL: ${{ contains( env.CREATOR, 'dependabot' ) }}
if: ${{ env.BOOL == 'true' }}
uses: actions/[email protected]
with:
project-url: https://github.com/orgs/senzing-garage/projects/3
github-token: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }}

add-to-project-dependabot:
secrets:
SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }}
uses: senzing-factory/build-resources/.github/workflows/add-to-project-dependabot.yaml@main
with:
project: ${{ vars.SENZING_PROJECT_GARAGE }}
8 changes: 5 additions & 3 deletions .github/workflows/add-to-project-garage.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: add-to-project-garage.yaml
name: 'add to project garage'

on:
issues:
types:
- reopened
- opened
- reopened

jobs:
add-to-project:
name: Add issue to project
Expand All @@ -12,5 +14,5 @@ jobs:
- name: Assign issue to project
uses: actions/[email protected]
with:
project-url: https://github.com/orgs/senzing-garage/projects/3
project-url: https://github.com/orgs/${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}/projects/${{ vars.SENZING_PROJECT_GARAGE }}
github-token: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }}
6 changes: 4 additions & 2 deletions .github/workflows/dependabot-approve-and-merge.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: dependabot-approve-and-merge.yaml
name: 'dependabot approve and merge'

on:
pull_request:
branches: [main]

jobs:
dependabot-approve-and-merge:
permissions:
contents: write
pull-requests: write
uses: senzing-factory/build-resources/.github/workflows/dependabot-approve-and-merge.yaml@main
secrets:
SENZING_GITHUB_CODEOWNER_PR_RW_TOKEN: ${{ secrets.SENZING_GITHUB_CODEOWNER_PR_RW_TOKEN }}
uses: senzing-factory/build-resources/.github/workflows/dependabot-approve-and-merge.yaml@v1
11 changes: 5 additions & 6 deletions .github/workflows/go-proxy-pull.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Based on
# - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# - https://github.com/marketplace/actions/go-proxy-warming
# - https://github.com/andrewslotin/go-proxy-pull-action
# - https://futurestud.io/tutorials/github-actions-run-a-workflow-when-creating-a-tag
name: 'go proxy pull'

name: go-proxy-pull.yaml
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

permissions:
contents: write

jobs:
go-proxy-pull:
runs-on: ubuntu-latest
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/go-test-darwin.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Based on
# - https://github.com/marketplace/actions/setup-go-environment
name: 'go test darwin'

name: go-test-darwin.yaml
on: [push]

env:
DYLD_LIBRARY_PATH: /opt/senzing/g2/lib:/opt/senzing/g2/lib/macos
LD_LIBRARY_PATH: /opt/senzing/g2/lib:/opt/senzing/g2/lib/macos
SENZING_TOOLS_DATABASE_URL: "sqlite3://na:na@/tmp/sqlite/G2C.db"

permissions:
contents: read

jobs:
go-test-darwin:
runs-on: ${{ matrix.os }}
Expand All @@ -21,17 +24,22 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Install Senzing API
uses: Senzing/github-action-install-senzing-api@latest
with:
senzingapi-version: ${{ matrix.senzingapi-version }}

- name: Copy /etc files
run: sudo cp testdata/senzing-license/g2.lic /opt/senzing/g2/etc/g2.lic

- name: Copy test database files
run: mkdir /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/G2C.db

- name: Run go test
run: go test -exec /Users/runner/work/go-rest-api-service/go-rest-api-service/bin/macos_exec_dyld.sh -v -p 1 ./...
16 changes: 12 additions & 4 deletions .github/workflows/go-test-linux.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
# Based on
# - https://github.com/marketplace/actions/setup-go-environment
name: 'go test linux'

name: go-test-linux.yaml
on: [push]

env:
LD_LIBRARY_PATH: /opt/senzing/g2/lib
SENZING_TOOLS_DATABASE_URL: "sqlite3://na:na@/tmp/sqlite/G2C.db"

permissions:
contents: read

jobs:
go-test-linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ["1.21"]
os: [ubuntu-latest]
senzingapi-version: [staging]
senzingapi-version: [latest]
name: "go test with Senzing: ${{ matrix.senzingapi-version }}; OS: ${{ matrix.os }}; Go: ${{ matrix.go }}"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Install Senzing API
uses: Senzing/github-action-install-senzing-api@latest
with:
senzingapi-version: ${{ matrix.senzingapi-version }}

- name: Copy /etc files
run: sudo cp testdata/senzing-license/g2.lic /etc/opt/senzing/g2.lic

- name: Copy test database files
run: mkdir /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/G2C.db

- name: Run go test
run: go test -v -p 1 ./...
15 changes: 12 additions & 3 deletions .github/workflows/go-test-windows.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Based on
# - https://github.com/marketplace/actions/setup-go-environment
name: 'go test windows'

name: go-test-windows.yaml
on: [push]

env:
SENZING_TOOLS_DATABASE_URL: 'sqlite3://na:na@nowhere/C:\Temp\sqlite\G2C.db'

permissions:
contents: read

jobs:
go-test-windows:
runs-on: ${{ matrix.os }}
Expand All @@ -19,19 +22,25 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Install Senzing API
uses: Senzing/github-action-install-senzing-api@latest
with:
senzingapi-version: ${{ matrix.senzingapi-version }}

- name: Add to "Path" environment variable
run: echo "C:\Program Files\Senzing\g2\lib" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Copy /etc files
run: copy testdata/senzing-license/g2.lic "C:\Program Files\Senzing\g2\etc\g2.lic"

- name: Copy test database files
run: mkdir "C:\Temp\sqlite" && copy testdata/sqlite/G2C.db "C:\Temp\sqlite\G2C.db"

- name: Run go test
run: go test -v -p 1 ./...
9 changes: 7 additions & 2 deletions .github/workflows/gofmt.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: gofmt.yaml
name: 'gofmt'

on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
gofmt:
uses: senzing-factory/build-resources/.github/workflows/gofmt.yaml@main
uses: senzing-factory/build-resources/.github/workflows/gofmt.yaml@v1
11 changes: 7 additions & 4 deletions .github/workflows/gosec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Based on
# - https://github.com/securego/gosec
name: 'gosec'

name: gosec.yaml
on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
gosec:
runs-on: ubuntu-latest
Expand All @@ -17,7 +19,8 @@ jobs:
steps:
- name: Checkout Source
uses: actions/checkout@v4

- name: Run Gosec Security Scanner
uses: securego/gosec@master
uses: securego/gosec@v2.18.2
with:
args: ./...
11 changes: 8 additions & 3 deletions .github/workflows/make-go-tag.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
name: make-go-tag.yaml
name: 'make go tag'

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
permissions: write-all

permissions:
contents: write

jobs:
make-go-tag:
name: Make a vM.m.P tag
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Make go version tag
uses: senzing-factory/github-action-make-go-tag@main
uses: senzing-factory/github-action-make-go-tag@v1
9 changes: 0 additions & 9 deletions .github/workflows/move-pr-to-done.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ go.work

# Makefile
target/

.coverage

rest-api-service-RFC8927-pretty.json

14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.1] - 2024-01-29

### Changed in 0.2.1

- Refactor to [template-go](https://github.com/senzing-garage/template-go)
- Update dependencies
- github.com/ogen-go/ogen v0.81.2
- github.com/senzing-garage/g2-sdk-go v0.9.0
- github.com/senzing-garage/go-sdk-abstract-factory v0.6.0
- go.opentelemetry.io/otel v1.22.0
- go.opentelemetry.io/otel/metric v1.22.0
- go.opentelemetry.io/otel/trace v1.22.0
- google.golang.org/grpc v1.61.0

## [0.2.0] - 2024-01-03

### Changed in 0.2.0
Expand Down
Loading

0 comments on commit 383e499

Please sign in to comment.