# This workflow will install Python dependencies, run tests and lint with a single version of Python # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Tests on: workflow_call: inputs: python-version: required: true type: string extra-requirements: required: false type: string jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python ${{ inputs.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ inputs.python-version }} - name: Display Python version run: python -c "import sys; print(sys.version)" - name: Install dependencies run: | python -m pip install --upgrade pip pip install pytest pytest-cov codecov beautifulsoup4 ${{ inputs.extra-requirements }} -e . - name: Test with pytest run: | pytest --cov=autodocsumm --cov-report=xml tests - name: Upload codecov env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | codecov