Skip to content

Commit

Permalink
CI set up for running tests in the python modules and generating cove…
Browse files Browse the repository at this point in the history
…rage report
  • Loading branch information
lincmba committed Nov 3, 2023
1 parent 4a44f67 commit 30aee5c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
38 changes: 36 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

# For more information see: https://docs.github.com/en/enterprise-cloud@latest/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle
name: CI

on:
pull_request:
branches:
- main

jobs:
run-unit-tests:
run-efsity-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -39,3 +39,37 @@ jobs:
- name: Run spotless check
run: ./gradlew spotlessApply
working-directory: efsity

run-importer-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Generate Importer Report
run: |
python3 -m venv venv
. venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest-cov
pytest importer --doctest-modules --junitxml=coverage.xml --cov=importer --cov-report=xml --cov-report=html
coverage xml
ls -al
working-directory: importer

run-cleaner-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Generate Cleaner Report
run: |
python3 -m venv venv
. venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest-cov
pytest cleaner --doctest-modules --junitxml=coverage.xml --cov=cleaner --cov-report=xml --cov-report=html
coverage xml
ls -al
working-directory: cleaner
3 changes: 2 additions & 1 deletion cleaner/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ click==8.1.3
oauthlib==3.2.2
requests==2.31.0
requests-oauthlib==1.3.1
urllib3==2.0.3
urllib3==2.0.3
pytest==7.4.2
3 changes: 2 additions & 1 deletion importer/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ oauthlib==3.2.2
requests==2.31.0
requests-oauthlib==1.3.1
urllib3==2.0.3
backoff==2.2.1
backoff==2.2.1
pytest==7.4.2

0 comments on commit 30aee5c

Please sign in to comment.