Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Mend Bolt for GitHub #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/scripts/maven_publish_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ set -eu -o pipefail
POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -q -DforceStdout)
PUBLISH_VERSION="${POM_VERSION%%-*}"

mvn --batch-mode versions:set -DnewVersion="${PUBLISH_VERSION}"
mvn --batch-mode -DskipTests deploy
mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}"
mvn --batch-mode --no-transfer-progress --activate-profiles release -DskipTests deploy
4 changes: 2 additions & 2 deletions .github/scripts/maven_publish_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpressi
GATEWAY_VERSION="${POM_VERSION%%-*}"
PUBLISH_VERSION="${GATEWAY_VERSION}-SNAPSHOT"

mvn --batch-mode versions:set -DnewVersion="${PUBLISH_VERSION}"
mvn --batch-mode -DskipTests deploy
mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}"
mvn --batch-mode --no-transfer-progress --activate-profiles release -DskipTests deploy
1 change: 1 addition & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
with:
java-version: 17
distribution: temurin
cache: maven
- name: Generate JavaDoc
run: make generate-docs-java
- name: Upload JavaDoc
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,37 @@ jobs:
name: Publish API documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout source
uses: actions/checkout@v3
with:
path: source
- name: Checkout publish
uses: actions/checkout@v3
with:
ref: gh-pages
path: publish
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Remove old API documentation
shell: bash
run: rm -rf "${GITHUB_REF_NAME}/api"
run: rm -rf "${GITHUB_REF_NAME}/api"
working-directory: publish
- name: Download JavaDoc
uses: actions/download-artifact@v3
with:
name: java-doc
path: ${{ github.ref_name }}/api/java
path: publish/${{ github.ref_name }}/api/java
- name: Download Node documentation
uses: actions/download-artifact@v3
with:
name: node-doc
path: ${{ github.ref_name }}/api/node
path: publish/${{ github.ref_name }}/api/node
- name: Publish
working-directory: publish
env:
USER_NAME: 'Hyperledger Bot'
USER_EMAIL: '[email protected]'
COMMIT_REF: ${{ github.sha }}
run: ./.github/scripts/git_push_changes.sh
run: ${{ github.workspace }}/source/.github/scripts/git_push_changes.sh

publish-node:
needs: build
Expand Down Expand Up @@ -69,6 +77,7 @@ jobs:
with:
java-version: 8
distribution: temurin
cache: maven
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
with:
java-version: 8
distribution: temurin
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
Expand Down
178 changes: 93 additions & 85 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,94 +10,102 @@ jobs:
verify-versions:
uses: ./.github/workflows/verify-versions.yml

shellcheck:
runs-on: ubuntu-latest
name: ShellCheck
steps:
- uses: actions/checkout@v3
- run: make shellcheck

docs:
needs: verify-versions
uses: ./.github/workflows/build-docs.yml

go:
needs: verify-versions
runs-on: ubuntu-22.04
name: Test Go
strategy:
fail-fast: false
matrix:
go-version:
- 1.17
- 1.18
- 1.19
env:
SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install SoftHSM
run: ./.github/scripts/install_softhsm.sh
env:
TMPDIR: ${{ runner.temp }}
- name: Generate mocks
run: make generate
- name: Run unit tests
run: make unit-test-go-pkcs11
- name: Pull Fabric Docker images
run: make pull-latest-peer
- name: Run scenario tests
run: make scenario-test-go
# go:
# needs: verify-versions
# runs-on: ubuntu-22.04
# name: Test Go
# strategy:
# fail-fast: false
# matrix:
# go-version:
# - 1.17
# - 1.18
# - 1.19
# env:
# SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v3
# with:
# go-version: ${{ matrix.go-version }}
# - name: Install SoftHSM
# run: ./.github/scripts/install_softhsm.sh
# env:
# TMPDIR: ${{ runner.temp }}
# - name: Generate mocks
# run: make generate
# - name: Run unit tests
# run: make unit-test-go-pkcs11
# - name: Pull Fabric Docker images
# run: make pull-latest-peer
# - name: Run scenario tests
# run: make scenario-test-go

node:
needs: verify-versions
runs-on: ubuntu-22.04
name: Test Node
strategy:
fail-fast: false
matrix:
node-version:
- 14
- 16
- 18
env:
SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-go@v3
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Run unit tests
run: make unit-test-node
- name: Install SoftHSM
run: ./.github/scripts/install_softhsm.sh
env:
TMPDIR: ${{ runner.temp }}
- name: Pull Fabric Docker images
run: make pull-latest-peer
- name: Run scenario tests
run: make scenario-test-node
# node:
# needs: verify-versions
# runs-on: ubuntu-22.04
# name: Test Node
# strategy:
# fail-fast: false
# matrix:
# node-version:
# - 14
# - 16
# - 18
# env:
# SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}
# - uses: actions/setup-go@v3
# with:
# go-version: ${{ env.DEFAULT_GO_VERSION }}
# - name: Run unit tests
# run: make unit-test-node
# - name: Install SoftHSM
# run: ./.github/scripts/install_softhsm.sh
# env:
# TMPDIR: ${{ runner.temp }}
# - name: Pull Fabric Docker images
# run: make pull-latest-peer
# - name: Run scenario tests
# run: make scenario-test-node

java:
needs: verify-versions
runs-on: ubuntu-22.04
name: Test Java
strategy:
fail-fast: false
matrix:
java-version:
- 8
- 11
- 17
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: temurin
- uses: actions/setup-go@v3
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Pull Fabric Docker images
run: make pull-latest-peer
- name: Run unit and scenario tests
run: make scenario-test-java
# java:
# needs: verify-versions
# runs-on: ubuntu-22.04
# name: Test Java
# strategy:
# fail-fast: false
# matrix:
# java-version:
# - 8
# - 11
# - 17
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-java@v3
# with:
# java-version: ${{ matrix.java-version }}
# distribution: temurin
# cache: maven
# - uses: actions/setup-go@v3
# with:
# go-version: ${{ env.DEFAULT_GO_VERSION }}
# - name: Pull Fabric Docker images
# run: make pull-latest-peer
# - name: Run unit and scenario tests
# run: make scenario-test-java
1 change: 1 addition & 0 deletions .github/workflows/verify-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
with:
java-version: 17
distribution: temurin
cache: maven
- name: Check Java artifact version
shell: bash
working-directory: java
Expand Down
14 changes: 14 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"scanSettings": {
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff",
"useMendCheckNames": true
},
"issueSettings": {
"minSeverityLevel": "LOW",
"issueType": "DEPENDENCY"
}
}
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#

base_dir := $(PWD)
base_dir := $(patsubst %/,%,$(dir $(realpath $(lastword $(MAKEFILE_LIST)))))

go_dir := $(base_dir)/pkg
node_dir := $(base_dir)/node
Expand Down Expand Up @@ -220,3 +220,7 @@ clean-java:
.PHONEY: clean-generated
clean-generated:
find "$(go_dir)" -name '*_mock_test.go' -delete

.PHONEY: shellcheck
shellcheck:
cd "$(base_dir)" && ./scripts/shellcheck.sh
47 changes: 0 additions & 47 deletions google-protos/google/rpc/status.proto

This file was deleted.

Loading