Skip to content

Commit

Permalink
build: [add] publish code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsoncm committed Nov 23, 2023
1 parent 19d4a5f commit 9b81b20
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy_to_pipy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: echo $RELEASE_VERSION

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.9

- name: Configure artifacts directory
run: mkdir artifacts
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Unittest

on:
push:
branches:
- "*"

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9

# - name: Lint
# continue-on-error: true
# run: |
# pip install pip install flake8 flake8-csv \
# && flake8 --statistics --benchmark --doctests --format=csv_categories --tee --output-file artifacts/flake8.csv

# - name: Static type check
# continue-on-error: true
# run: |
# pip install mypy lxml \
# && mypy --warn-unused-configs --python-version 3.8 --show-error-context --show-column-numbers --show-error-end --show-error-codes --pretty --html-report artifacts/statictypecheck --cobertura-xml-report statictypecheck competencias

- name: Unit test
continue-on-error: true
run: |
pip install -r requirements.txt -r requirements-dev.txt \
&& pytest --cov-report=xml --cov-report=html --cov-report=lcov --cov=competencias -s .
- name: Archive QA artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
htmlcov/
.coverage
coverage.xml
coverage.lcov
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.2.3
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Python Competencias

[![Coverage Status](https://coveralls.io/repos/github/lais-huol/py-competencias/badge.svg?branch=main)](https://coveralls.io/github/lais-huol/py-competencias?branch=main)

Implementação em Python de biblioteca para trabalhar com Competencias no estilo YYYYMM.

Retorna a lista de competêncais dada uma faixa de competências, a competência atual, a competência passada e a competência futura. Como atual entende-se o timestamp do now(). Cada competência tem os atributos as_int, as_decimal, as_date, as_datetime, as_time e as_string, conforme documentado abaixo.
Expand Down

0 comments on commit 9b81b20

Please sign in to comment.