Skip to content

Commit

Permalink
build: release 0.3.0 (PR #197)
Browse files Browse the repository at this point in the history
Merge develop and release 0.3.0
  • Loading branch information
borisrizov-zf authored Dec 7, 2023
2 parents 68c2f49 + fb05100 commit d4c1e8d
Show file tree
Hide file tree
Showing 51 changed files with 3,190 additions and 2,489 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/app-test-coverage-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# /********************************************************************************
# * Copyright (c) 2023 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License, Version 2.0 which is available at
# * https://www.apache.org/licenses/LICENSE-2.0.
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# * License for the specific language governing permissions and limitations
# * under the License.
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/

name: Application test and coverage -- PR context

on:
pull_request:
paths:
- 'src/**'

jobs:
test-app:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Test app
run: ./gradlew test

- name: Get coverage
if: always()
run: ./gradlew jacocoTestReport

- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: ${{ github.workspace }}/build/

- name: Publish code coverage report as PR comment
uses: madrapps/[email protected]
if: always()
with:
paths: |
${{ github.workspace }}/build/reports/xml/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
title: Coverage Report
68 changes: 68 additions & 0 deletions .github/workflows/app-test-coverage-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# /********************************************************************************
# * Copyright (c) 2023 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License, Version 2.0 which is available at
# * https://www.apache.org/licenses/LICENSE-2.0.
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# * License for the specific language governing permissions and limitations
# * under the License.
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/

name: Application test and coverage -- Repository context

on:
workflow_run:
workflows: [ 'Application test and coverage -- PR context' ]
types:
- completed

permissions:
contents: read
actions: read
checks: write

jobs:
test-app:
runs-on: ubuntu-latest

steps:
- name: Download test results
uses: actions/download-artifact@v3
with:
name: test-results
path: ${{ github.workspace }}/

- name: Setup .NET Core # Required to execute ReportGenerator
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.x
dotnet-quality: 'ga'

- name: Generate test report
uses: dorny/[email protected]
with:
name: Test results
path: 'test-results/test/*.xml'
reporter: java-junit
fail-on-error: false

- name: Create Markdown from code coverage report
uses: danielpalme/[email protected]
with:
reports: reports/xml/jacoco.xml
targetdir: coveragereport
reporttypes: MarkdownSummaryGithub
sourcedirs: src/main/java
title: 'Code Coverage'

- name: Publish Markdown code coverage report as job summary
run: cat coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
101 changes: 0 additions & 101 deletions .github/workflows/app-test-coverage.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/

name: Lint and Test Charts
name: Verify and Test Helm Chart

on:
workflow_dispatch:
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Add bitnami repo
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
- name: Update Helm dependencies
Expand All @@ -63,6 +63,29 @@ jobs:
- name: Run linting
run: ct lint --config charts/chart-testing-config.yaml --charts ./charts/managed-identity-wallet

verify-helm-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run helm docs command
uses: addnab/docker-run-action@v3
with:
image: jnorwood/helm-docs:v1.11.3
options: -v ${{ github.workspace }}/charts:/helm-docs
run: helm-docs

- name: Verify that no changes are required
run: |
if $(git diff --quiet --exit-code); then
echo "Helm chart docs up to date"
else
echo "Helm chart docs not up to date:"
git diff
exit 1
fi
chart-test:
runs-on: ubuntu-latest
steps:
Expand All @@ -86,7 +109,7 @@ jobs:

- name: Add bitnami repo
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
- name: Update Helm dependencies
Expand All @@ -103,8 +126,6 @@ jobs:

- name: Build app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
SKIP_GRADLE_TASKS_PARAM: "-x jacocoTestCoverageVerification -x test"
run: task app:build

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/dast-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ jobs:
- name: Build app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
SKIP_GRADLE_TASKS_PARAM: "-x jacocoTestCoverageVerification -x test"
run: task app:build

Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,18 @@ jobs:
- name: Run semantic release
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx --yes -p @semantic-release/exec -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/commit-analyzer -p @semantic-release/release-notes-generator semantic-release
- name: Run semantic release (dry run)
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx --yes -p @semantic-release/exec -p @semantic-release/github -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/commit-analyzer -p @semantic-release/release-notes-generator semantic-release --dry-run
- name: Execute Gradle build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
run: ./gradlew build

- name: Upload build artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/veracode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build -PgithubToken=${{ secrets.GITHUB_TOKEN }}
arguments: build

- name: Veracode Upload And Scan
uses: veracode/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ dev-assets/env-files/env.local
dev-assets/env-files/env.docker
dev-assets/env-files/env.environment
dev-assets/docker-environment/postgres/db.sh
dev-assets/docker-environment/pgAdmin/servers.json
dev-assets/docker-environment/pgAdmin/storage/*

.java-version

Expand Down
Loading

0 comments on commit d4c1e8d

Please sign in to comment.