Skip to content

Update github actions with codacy api token #580

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

Merged
merged 1 commit into from
Apr 10, 2025
Merged
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
42 changes: 4 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Loading