Skip to content

Bump actions/upload-artifact from 6 to 7 in /.github/workflows #4046

Bump actions/upload-artifact from 6 to 7 in /.github/workflows

Bump actions/upload-artifact from 6 to 7 in /.github/workflows #4046

Workflow file for this run

# This file is part of Dependency-Track.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://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
# Copyright (c) OWASP Foundation. All Rights Reserved.
name: CI
on:
push:
branches:
- main
- "feature-**"
pull_request:
branches:
- main
- "feature-**"
permissions: { }
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Set up JDK
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # tag=v5.2.0
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Test
run: |-
mvn -B --no-transfer-progress -pl '!e2e' clean verify \
failsafe:integration-test -DskipITs=false
# Publishing coverage to Codacy is only possible for builds of push events.
# PRs from forks do not get access to repository secrets.
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
- name: Publish test coverage
if: ${{ github.event_name != 'pull_request' && github.repository_owner == 'DependencyTrack' }}
run: |-
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
--project-token ${{ secrets.CODACY_PROJECT_TOKEN }} \
--commit-uuid ${{ github.sha }} \
--coverage-reports **/target/site/jacoco/jacoco.xml \
--language Java
- name: Save PR details
if: ${{ github.event_name == 'pull_request' }}
run: |-
echo ${{ github.sha }} > pr-commit.txt
echo ${{ github.event.number }} > PR_NUMBER.txt
- name: Upload PR test coverage report
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v7
with:
name: pr-test-coverage-report
path: |-
pr-commit.txt
PR_NUMBER.txt
**/target/site/jacoco/jacoco.xml