Skip to content

Commit

Permalink
added mock testing files
Browse files Browse the repository at this point in the history
  • Loading branch information
Yudi-G committed Jun 2, 2024
1 parent 2173002 commit b027a14
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 60 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/python-app-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This workflow will install Python dependencies, run tests and
# lint with a single version of Python
# For more information see:
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
pull_request:


permissions:
contents: read

jobs:
check-tests:
runs-on: ubuntu-latest
outputs:
tests_exist: ${{ steps.check.outputs.tests_exist }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Check for test files
id: check
run: |
if find . -type f -name "*.test.py" | grep -q .; then
echo "::set-output name=tests_exist::true"
else
echo "::set-output name=tests_exist::false"
fi
run-tests:

runs-on: ubuntu-latest
needs: check-tests
if: needs.check-tests.outputs.tests_exist == 'true'

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
60 changes: 0 additions & 60 deletions .github/workflows/python-app-test.yml

This file was deleted.

0 comments on commit b027a14

Please sign in to comment.