Skip to content

Update pytest.yml

Update pytest.yml #36

Workflow file for this run

name: pytest
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
mongodb-version: ['4.4']
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.7"
- name: Install alfred3_interact
run: |
pip install .[dev]
pip list
- name: Run pytest
run: pytest --cov=alfred3_interact tests/
- name: coverage.py badge
uses: tj-actions/coverage-badge-py@v2
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v18
id: changed_files
with:
files: coverage.svg
- name: Commit files
if: steps.changed_files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "Updated coverage.svg"
- name: Push changes
if: steps.changed_files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}