Skip to content

Merge pull request #72 from nlioc4/master #18

Merge pull request #72 from nlioc4/master

Merge pull request #72 from nlioc4/master #18

# This workflow will run all test files with code coverage enabled and upload
# the results to coveralls.io. Only enabled for the main repository.
name: Code Coverage
on: [push, pull_request]
jobs:
coverage:
if: github.repository == 'leonhard-s/auraxium' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./requirements.txt
python -m pip install coveralls
- name: Run tests
env:
SERVICE_ID: ${{secrets.REPO_SERVICE_ID}}
run: |
python -m coverage run --source auraxium/ -m unittest discover -p *_test.py tests/unit/
python -m coverage run --append --source auraxium/ -m unittest discover -p *_test.py tests/integration/
python -m coverage run --append --source auraxium/ -m unittest discover -p *_test.py tests/live/
- name: Upload code coverage analysis
env:
COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}}
run: |
python -m coveralls