From a92c00838ab67db085cfce18d36e29221f024160 Mon Sep 17 00:00:00 2001 From: jainadc9 <93383550+jainadc9@users.noreply.github.com> Date: Thu, 10 Apr 2025 13:03:06 +0530 Subject: [PATCH] Update github actions with codacy api token --- .github/workflows/main.yml | 42 ++++---------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 69cc70ae1..3bd56b730 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,47 +88,13 @@ jobs: - name: Run integration tests run: | mvn --version - mvn verify -DskipUTs -Djasypt.encryptor.password=integrationtest -Dspring.config.location=src/integrationtests/resources/application.properties -B - - reportCoverage: - if: github.repository == 'eiffel-community/eiffel-intelligence' && github.event_name == 'push' - # The type of runner that the job will run on - runs-on: ubuntu-latest - env: - M2_HOME: /opt/apache-maven-3.6.3 - MAVEN_HOME: /opt/apache-maven-3.6.3 + mvn verify -DskipUTs -Djasypt.encryptor.password=integrationtest -Dspring.config.location=src/integrationtests/resources/application.properties jacoco:report -Dformats=xml -B - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '17' - - - name: Install Maven - shell: bash - run: | - wget https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp - tar xf /tmp/apache-maven-3.6.3-bin.tar.gz -C /opt - echo "${M2_HOME}/bin" >> $GITHUB_PATH - - # To ensure docker containers are fully up and running we sleep 60s - - name: Before script - run: | - source src/main/docker/env.bash - docker compose -f src/main/docker/docker-compose.yml up -d mongodb mongodb-auth rabbitmq eiffel-er mail-server - sleep 60 - - - name: Run jacoco - shell: bash - run: | - mvn -V -B -U clean test -DskipITs -Dsurefire.rerunFailingTestsCount=2 -Djasypt.encryptor.password=secret -Dspring.config.location=src/functionaltests/resources/application.properties jacoco:report -Dformats=xml - # Generating test coverage report and publishing to Codacy - name: Run report coverage + if: github.event_name == 'push' uses: codacy/codacy-coverage-reporter-action@v1 with: - project-token: 571cdd20d4bf435f84b25d806d304792 + api-token: ${{ secrets.CODACY_API_TOKEN }} coverage-reports: target/site/jacoco/jacoco.xml +