Skip to content

Commit

Permalink
Merge pull request #3 from telefonicasc/coverage-action
Browse files Browse the repository at this point in the history
ADD coverage to GitAction
  • Loading branch information
arcosa authored Mar 18, 2024
2 parents 37cd0c3 + 290beca commit 366b5bd
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 32 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/unit-tests.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/unittest-and-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Python Tests & Coverage

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: Run Python Tests and Generate Coverage
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: |
pip install .
pip install pytest coverage
- name: Run tests with coverage
# pyjexl code is omit as it doesn't belong to us
run: |
coverage run --omit=tcjexl/pyjexl/**,tests/** -m pytest
- name: Generate coverage report
run: |
coverage lcov -o coverage/lcov.info
- name: Upload coverage to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage/lcov.info
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Additional ones manually added
coverage
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# tcjexl

[![Coverage Status](https://coveralls.io/repos/github/telefonicasc/tcjexl/badge.svg)](https://coveralls.io/github/telefonicasc/tcjexl)

This is a wrapper of the [pyjexl](https://pypi.org/project/pyjexl/) library, including a set of default transformations (detailed in [this section](#included-transformations))

Current version of the tcjexl library embeds the pyjexl code (as in [0.3.0 release](https://files.pythonhosted.org/packages/ab/1d/757ac4c9ae2da97cbb2c844fb70395990b5bbacccff5c0297ceefd670c62/pyjexl-0.3.0.tar.gz)) in order to apply some fixes. Ideally, the fix should be applied on the upstream library (in this sense, ve have created [this PR](https://github.com/mozilla/pyjexl/pull/30)) but it hasn't been merged yet at the moment of writing this by pyjexl mantainers. Hopefully, if at some moment the fix is applied on pyjexl we could simplify this (it would be a matter of rollback [this PR](https://github.com/telefonicasc/tcjexl/pull/6) and set the proper pyjexl dependency, e.g. `pyjexl==0.4.0`)
Expand Down

0 comments on commit 366b5bd

Please sign in to comment.