This repository has been archived by the owner on May 5, 2022. It is now read-only.
forked from SpamScope/mail-parser
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
73 lines (58 loc) · 2.68 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
sudo: required
language: python
python:
- "2.7"
- "3.7"
- "3.8"
- "3.9"
before_install:
- sudo apt-get -qq update
# Install msgconvert
- sudo apt-get install -y libemail-outlook-message-perl
# make images
- if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then
if [ "$TRAVIS_BRANCH" == "master" ]; then
cd docker &&
docker build --build-arg BRANCH=$TRAVIS_BRANCH -t $DOCKER_USERNAME/spamscope-mail-parser . &&
docker run -i -t --rm $DOCKER_USERNAME/spamscope-mail-parser &&
cd -;
fi
if [ "$TRAVIS_BRANCH" == "develop" ]; then
cd docker &&
docker build --build-arg BRANCH=$TRAVIS_BRANCH -t $DOCKER_USERNAME/spamscope-mail-parser:$TRAVIS_BRANCH . &&
docker run -i -t --rm $DOCKER_USERNAME/spamscope-mail-parser:$TRAVIS_BRANCH &&
cd -;
fi
fi
# command to install dependencies
install:
- pip install -r requirements.txt
- pip install coveralls
# Install msgconvert
- export PERL_MM_USE_DEFAULT=1
- sudo cpan -f -i Email::Outlook::Message
# command to run tests
script:
- coverage run --source=mailparser/ --omit=mailparser/__main__.py tests/test_mail_parser.py
- python tests/test_main.py
- python -m mailparser -v
- python -m mailparser -h
- python -m mailparser -f tests/mails/mail_malformed_3 -j
- cat tests/mails/mail_malformed_3 | python -m mailparser -k -j
after_success:
- coveralls
- if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then
if [ "$TRAVIS_BRANCH" == "master" ]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push $DOCKER_USERNAME/spamscope-mail-parser;
fi
if [ "$TRAVIS_BRANCH" == "develop" ]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push $DOCKER_USERNAME/spamscope-mail-parser:$TRAVIS_BRANCH;
fi
fi
notifications:
email: false
slack:
secure: eawY0ibL+ldzr+lL+QQHicUaoQwom01P7g57avv9ebZ256VMzTuiIYkkNuyetTmjU7oACgrzmIJiuYdeyYYqJDfGBLS/Z6KeIb11iAa9vAmAjmoarP1eyR6XcyIOpAxRXDFDGaqjEqyjikI3P8HQvnv24YFRdpR0jd8kf9rZ9DHVMIOKRi4okBmZvCCgS5YhZJEdOujHwPlF71ZIOk26S7dGRu4gJeLRMPnhwcM2TKqcsU+cZaaRP9n/0sQ/gqDbb+SKtENGLNfTuTuJvhrhsGcbGpFH4M5RDpvJvvlUZQhJBc3ordFXYGT0IQcAn4Os4gOXgcy0JD+74uh/uICohvWKJio5diwH91FVkTF/gODOKSfyEfO2nAKHLF8KRkYoPitecR9KdUbEALeHRxNxWLfumivzJxOK4QLo94qx6LvSIA9j3o137U0POA7gRHYmZCSdDrkxBI5eFqBbivLNGKN6v0a5tZIRSCLfNsr6ZiNcxM5KO9vUIMJ6HdpNTZDqKsd9JFdV2wI/q/yy7vhoocxAtk+H88jdvrqiA9B5jwoHaQ7lGsgmkvPNLeuNsarr3VDGZGzMmqnssx9G4F8jQP52n4t2RfZqe6xE2867J4tt1H/5YkWJiacoxquAe7DcCn1qXko9q9Mbs6lDN9fumb3J5HmG7R/yeX79zAGPE5w=