From f5bd44d6ec3b28107df7954f0045e4ee0f74738f Mon Sep 17 00:00:00 2001 From: Kohulan Rajan Date: Tue, 12 Nov 2024 13:53:47 +0100 Subject: [PATCH 1/6] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 082c174..33ac856 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: run: | python3 -m pytest --cov=./ --cov-report=xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v4.6.0 with: directory: ./coverage/reports/ fail_ci_if_error: true From 07f5c6faeb2e0cc88c70820dca27e695d58dc7b6 Mon Sep 17 00:00:00 2001 From: Kohulan Rajan Date: Tue, 12 Nov 2024 14:48:33 +0100 Subject: [PATCH 2/6] Update test.yml --- .github/workflows/test.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 33ac856..b3b8a8a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,12 +41,7 @@ jobs: run: | python3 -m pytest --cov=./ --cov-report=xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4.6.0 - with: - directory: ./coverage/reports/ - fail_ci_if_error: true - files: /home/runner/work/cheminformatics-microservice/cheminformatics-microservice/coverage.xml - flags: unittests - name: codecov-umbrella - verbose: true - token: ${{ secrets.CODECOV_TOKEN }} + run: | + curl -Os https://cli.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service -f coverage-service.xml From eeb55e386b1583d9f49407c92e0a7a7a68f01576 Mon Sep 17 00:00:00 2001 From: Kohulan Rajan Date: Tue, 12 Nov 2024 15:25:42 +0100 Subject: [PATCH 3/6] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3b8a8a..501034b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,4 +44,4 @@ jobs: run: | curl -Os https://cli.codecov.io/latest/linux/codecov chmod +x codecov - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service -f coverage-service.xml + ./codecov upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -f coverage-service.xml -F service -n "service-${{ github.run_id }}" From d94d8bfb587753aa235a51ff030560f4f0732336 Mon Sep 17 00:00:00 2001 From: Kohulan Rajan Date: Tue, 12 Nov 2024 16:11:10 +0100 Subject: [PATCH 4/6] Update test.yml --- .github/workflows/test.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 501034b..082c174 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,12 @@ jobs: run: | python3 -m pytest --cov=./ --cov-report=xml - name: Upload coverage to Codecov - run: | - curl -Os https://cli.codecov.io/latest/linux/codecov - chmod +x codecov - ./codecov upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -f coverage-service.xml -F service -n "service-${{ github.run_id }}" + uses: codecov/codecov-action@v4 + with: + directory: ./coverage/reports/ + fail_ci_if_error: true + files: /home/runner/work/cheminformatics-microservice/cheminformatics-microservice/coverage.xml + flags: unittests + name: codecov-umbrella + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} From e11a3a37f559552c832a39c1efb6149b70e6955a Mon Sep 17 00:00:00 2001 From: Kohulan Rajan Date: Tue, 12 Nov 2024 16:23:08 +0100 Subject: [PATCH 5/6] Update test.yml --- .github/workflows/test.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 082c174..0dd46c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,16 +1,17 @@ -name: test - -on: - workflow_call: +name: API workflow + +on: [push, pull_request] jobs: test: runs-on: ubuntu-latest + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} strategy: matrix: python-version: ["3.10"] steps: - - uses: actions/checkout@v4.1.4 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: @@ -37,16 +38,16 @@ jobs: - name: Analysing the code with pylint run: | flake8 --per-file-ignores="__init__.py:F401" --ignore E402,E501,W503 $(git ls-files '*.py') . - - name: Run test + - name: Run tests and collect coverage run: | - python3 -m pytest --cov=./ --cov-report=xml - - name: Upload coverage to Codecov + pytest --cov=./ --cov-report=xml + - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: - directory: ./coverage/reports/ + file: ./coverage.xml fail_ci_if_error: true - files: /home/runner/work/cheminformatics-microservice/cheminformatics-microservice/coverage.xml - flags: unittests + flags: service name: codecov-umbrella verbose: true - token: ${{ secrets.CODECOV_TOKEN }} From 04c360bf917109f6632f29196c10691983916c29 Mon Sep 17 00:00:00 2001 From: Kohulan Rajan Date: Tue, 12 Nov 2024 16:32:13 +0100 Subject: [PATCH 6/6] Update test.yml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0dd46c5..ec3d051 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,9 +40,9 @@ jobs: flake8 --per-file-ignores="__init__.py:F401" --ignore E402,E501,W503 $(git ls-files '*.py') . - name: Run tests and collect coverage run: | - pytest --cov=./ --cov-report=xml + python3 -m pytest --cov=./ --cov-report=xml - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v4.6.0 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: