fix: src/envoy-configmap-updater/Dockerfile to reduce vulnerabilities #819
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit-Test | |
on: | |
push | |
jobs: | |
endpoint-service-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '17' | |
java-package: jdk | |
- name: Run tests | |
run: | | |
cd src/endpoint-configuration-service/ | |
mvn clean verify | |
- name: Setup .NET Core # Required to execute ReportGenerator | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.100 | |
- name: ReportGenerator | |
uses: danielpalme/[email protected] | |
with: | |
reports: 'src/endpoint-configuration-service/target/site/jacoco/jacoco.xml' | |
targetdir: 'coveragereport' | |
reporttypes: 'lcov' | |
sourcedirs: 'src/endpoint-configuration-service/src/main/java' | |
- name: Upload coverage-report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ecs | |
path: coveragereport/lcov.info | |
ishare-auth-provider-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.17.3 | |
- name: Go test | |
run: | | |
cd src/ishare-auth-provider/ | |
go test -v -covermode=count -coverprofile=coverage.out | |
- name: Transform report | |
uses: jandelgado/[email protected] | |
with: | |
infile: coverage.out | |
outfile: coverage.lcov | |
working-directory: src/ishare-auth-provider/ | |
- name: Upload coverage-report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: auth-provider | |
path: src/ishare-auth-provider/coverage.lcov | |
cached-auth-filter-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.17.3 | |
- name: Go test | |
run: | | |
cd src/cached-auth-filter/ | |
go test -v -tags=proxytest -covermode=count -coverprofile=coverage.out | |
- name: Transform report | |
uses: jandelgado/[email protected] | |
with: | |
infile: coverage.out | |
outfile: coverage.lcov | |
working-directory: src/cached-auth-filter/ | |
- name: Make it coveralls compatible | |
run: | | |
cd src/cached-auth-filter/ | |
sed -i 's/fiware.org/src/g' coverage.lcov | |
- name: Upload coverage-report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cached-auth-filter | |
path: src/cached-auth-filter/coverage.lcov | |
aggregate-report: | |
needs: [endpoint-service-test, ishare-auth-provider-test, cached-auth-filter-test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: download ecs report | |
uses: actions/download-artifact@v2 | |
with: | |
name: ecs | |
path: coverage/ecs | |
- name: download auth-provider report | |
uses: actions/download-artifact@v2 | |
with: | |
name: auth-provider | |
path: coverage/auth-provider | |
- name: download cached-auth-filter report | |
uses: actions/download-artifact@v2 | |
with: | |
name: cached-auth-filter | |
path: coverage/cached-auth-filter | |
- name: prepare | |
run: | | |
sudo apt-get install -y lcov | |
- name: aggregate | |
run: | | |
cd coverage | |
cat cached-auth-filter/coverage.lcov | |
cat auth-provider/coverage.lcov | |
lcov -a auth-provider/coverage.lcov -a cached-auth-filter/coverage.lcov -a ecs/lcov.info -o ../lcov.info | |
- name: Upload coverage-report | |
uses: actions/upload-artifact@v2 | |
with: | |
path: lcov.info | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ${{ github.workspace }}/lcov.info | |