From fabddb2e02e6dbc7375c7a91bb2ada457fb9dbef Mon Sep 17 00:00:00 2001 From: kedhammar Date: Fri, 9 Feb 2024 13:33:32 +0100 Subject: [PATCH 1/7] try integrating codecov in GHA --- .github/workflows/test-code.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index aef9f4d9..b532128c 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -21,3 +21,10 @@ jobs: - name: pytest # Options are configured in pyproject.toml run: pytest + - name: Upload coverage reports to Codecov + run: | + # Replace `linux` below with the appropriate OS + # Options are `alpine`, `linux`, `macos`, `windows` + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -t ${CODECOV_TOKEN} From dffb4352fdf7c09a2313f0751cee1975a0a39faa Mon Sep 17 00:00:00 2001 From: kedhammar Date: Fri, 9 Feb 2024 13:47:59 +0100 Subject: [PATCH 2/7] try different setup --- .github/workflows/test-code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index b532128c..2a3760a4 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -27,4 +27,4 @@ jobs: # Options are `alpine`, `linux`, `macos`, `windows` curl -Os https://uploader.codecov.io/latest/linux/codecov chmod +x codecov - ./codecov -t ${CODECOV_TOKEN} + ./codecov -t ${{ secrets.CODECOV_TOKEN }} From 601eef08e1dd8556c8b5a541fc165bf5f95a4cde Mon Sep 17 00:00:00 2001 From: kedhammar Date: Fri, 9 Feb 2024 13:51:37 +0100 Subject: [PATCH 3/7] separate jobs, set fetch-depth 0 for CodeCov job --- .github/workflows/test-code.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 2a3760a4..075b1ef1 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -21,7 +21,25 @@ jobs: - name: pytest # Options are configured in pyproject.toml run: pytest - - name: Upload coverage reports to Codecov + codecov: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r requirements-dev.txt + - name: Install TACA + run: pip install -e . + - name: CodeCov run: | # Replace `linux` below with the appropriate OS # Options are `alpine`, `linux`, `macos`, `windows` From 900f1cd769354cf51996684cd09d5c4537937741 Mon Sep 17 00:00:00 2001 From: kedhammar Date: Fri, 9 Feb 2024 14:07:19 +0100 Subject: [PATCH 4/7] rejoin jobs and debug token --- .github/workflows/test-code.yml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 075b1ef1..b2d3ee99 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -21,24 +21,9 @@ jobs: - name: pytest # Options are configured in pyproject.toml run: pytest - codecov: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies + - name: Check CodeCov token run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r requirements-dev.txt - - name: Install TACA - run: pip install -e . + echo "Token is set: ${{ secrets.CODECOV_TOKEN != '' }}" - name: CodeCov run: | # Replace `linux` below with the appropriate OS From 3335817861c6919feda03b213191bd20d966a3a0 Mon Sep 17 00:00:00 2001 From: kedhammar Date: Fri, 9 Feb 2024 14:20:08 +0100 Subject: [PATCH 5/7] try again --- .github/workflows/test-code.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index b2d3ee99..cb17a2b5 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -7,6 +7,8 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 with: @@ -23,7 +25,7 @@ jobs: run: pytest - name: Check CodeCov token run: | - echo "Token is set: ${{ secrets.CODECOV_TOKEN != '' }}" + echo "Token is set: ${{ secrets.CODECOV_TOKEN }}" - name: CodeCov run: | # Replace `linux` below with the appropriate OS From 2f7fd6f69c128486ff4d3a833fd44920d07611af Mon Sep 17 00:00:00 2001 From: kedhammar Date: Fri, 9 Feb 2024 14:38:25 +0100 Subject: [PATCH 6/7] remove secret debugging --- .github/workflows/test-code.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index cb17a2b5..8a06d7ac 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -23,9 +23,6 @@ jobs: - name: pytest # Options are configured in pyproject.toml run: pytest - - name: Check CodeCov token - run: | - echo "Token is set: ${{ secrets.CODECOV_TOKEN }}" - name: CodeCov run: | # Replace `linux` below with the appropriate OS From 66cd572e83a1514f530b16802cf180e995dc1df5 Mon Sep 17 00:00:00 2001 From: Alfred Kedhammar <89784800+kedhammar@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:08:41 +0100 Subject: [PATCH 7/7] Update VERSIONLOG.md --- VERSIONLOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VERSIONLOG.md b/VERSIONLOG.md index f0dc37c6..d7d1f39a 100644 --- a/VERSIONLOG.md +++ b/VERSIONLOG.md @@ -1,5 +1,9 @@ # TACA Version Log +## 20240209.1 + +Implement CodeCoverage in CI. + ## 20240208.2 Implement CI testing and increase testing coverage.