Skip to content

Commit

Permalink
Merge pull request #13 from wahlflo/add_github_action
Browse files Browse the repository at this point in the history
added workflow file for unit tests
  • Loading branch information
wahlflo authored Feb 27, 2023
2 parents ed0f0a4 + b0db0a1 commit 9e15f23
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Unit-Tests

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" , "3.11" ]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pytest
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Unit-Tests](https://github.com/wahlflo/eml_analyzer/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/wahlflo/eml_analyzer/actions/workflows/unit-tests.yml)

# emlAnalyzer
A CLI script to analyze an email in the EML format for viewing headers, extracting attachments, etc.

Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

with open('README.md', mode='r', encoding='utf-8') as readme_file:
long_description = readme_file.read()
# remove badges in Readme
long_description = '# emlAnalyzer' + long_description.split('# emlAnalyzer')[1]


setuptools.setup(
Expand Down

0 comments on commit 9e15f23

Please sign in to comment.