From 06fd65f5cee3de9b88539a2056f09236895c7405 Mon Sep 17 00:00:00 2001 From: keke125 Date: Wed, 29 Nov 2023 15:04:27 +0800 Subject: [PATCH 1/2] Update codecov.yml --- .github/workflows/codecov.yml | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index e420c7d..dd75b25 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,4 +1,30 @@ -- name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} +name: Workflow for Codecov java maven +on: [push, pull_request] +env: + NA_DB_URL: 'jdbc:mariadb://localhost:3306/NA' + NA_DB_USER: 'NA' + NA_DB_PASSWORD: ${{ secrets.DBPassword }} +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v1 + with: + java-version: 21 + - name: Start MariaDB + uses: getong/mariadb-action@v1.1 + with: + mysql database: 'NA' + mysql user: 'NA' + mysql password: ${{ secrets.DBPassword }} + - name: Install dependencies + run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V + - name: Run tests and collect coverage + run: mvn -B test + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4-beta + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} From 73e69788f205d8dbb789bb95457f63e8a52bf968 Mon Sep 17 00:00:00 2001 From: keke125 Date: Wed, 29 Nov 2023 15:07:22 +0800 Subject: [PATCH 2/2] Update codecov.yml --- .github/workflows/codecov.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index dd75b25..406ddc8 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -16,8 +16,8 @@ jobs: java-version: 21 - name: Start MariaDB uses: getong/mariadb-action@v1.1 - with: - mysql database: 'NA' + with: + mysql database: 'NA' mysql user: 'NA' mysql password: ${{ secrets.DBPassword }} - name: Install dependencies