Skip to content

Commit

Permalink
Add code tests + coverage workflow (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandomr authored Aug 9, 2023
1 parent 4efbcf3 commit ee15c83
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
omit =
tests/*
42 changes: 42 additions & 0 deletions .github/workflows/pytest_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Tests

on:
pull_request:
branches:
- main

jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Install dependencies with Poetry
run: |
poetry install
- name: Run tests with coverage using Poetry
run: |
poetry run pytest tests --cov=./ --cov-report=term --cov-report=xml:coverage.xml
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: true
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Terarium TA1 Middleware Service

[![codecov](https://codecov.io/github/DARPA-ASKEM/TA1-Service/branch/main/graph/badge.svg?token=XEARJHESHY)](https://codecov.io/github/DARPA-ASKEM/TA1-Service)

The TA1 Middleware Service is designed to provide an intermediate job queue for management of long running TA1 extraction and profiling tasks. It enables the Terarium HMI to request TA1 tasks to be performed asynchronously, with robust error handling, and with customized ETL of TA1 responses into Terarium specific schemas and specifications. It currently supports the following functions:

1. Equation to AMR: both LaTeX and MathML
Expand Down

0 comments on commit ee15c83

Please sign in to comment.