DragonComputer/Dragonfire

View on GitHub
.github/workflows/tests.yml

Summary

Maintainability
Test Coverage
name: Automated Tests

on: [push]

jobs:
  main:
    name: Main Job
    runs-on: ubuntu-latest
    container:
      image: docker://dragoncomputer/dragonfire:latest

    steps:
    - uses: actions/checkout@v1

    - name: Cache pip packages
      uses: actions/cache@v1
      with:
        path: /root/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
        restore-keys: |
          ${{ runner.os }}-pip-

    - name: Install dependencies
      run: |
        pip3 install -e .
        pip3 install pytest-faulthandler
        apt-get -y install xvfb

    - name: Test with pytest
      run: |
        pip3 install pytest pytest-cov codecov
        xvfb-run --auto-servernum python3 -m pytest --cov=dragonfire/ --capture=sys --disable-pytest-warnings -vv
        # send the code coverage report to Codeconv
        codecov --token=${{ secrets.CODECOV_TOKEN }}