Skip to content

Commit 18e880c

Browse files
committed
Add GitHub Actions workflow since TravisCI stopped working
1 parent edf23bc commit 18e880c

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

.github/workflows/test_and_build.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-alpha.5"]
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install -r test_requirements.txt
23+
- name: Lint with flake8
24+
run: |
25+
make lint
26+
- name: Test with pytest
27+
run: |
28+
make test

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ lint:
1313

1414
.PHONY: test
1515
test:
16-
pytest --cov=email_validator
16+
PYTHONPATH=.:$PYTHONPATH pytest --cov=email_validator
1717

1818
.PHONY: testcov
1919
testcov: test

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ And this library does NOT permit obsolete forms of email addresses, so
2727
if you need strict validation against the email specs exactly, use
2828
[pyIsEmail](https://github.com/michaelherold/pyIsEmail).
2929

30-
[![Build Status](https://app.travis-ci.com/JoshData/python-email-validator.svg?branch=main)](https://app.travis-ci.com/JoshData/python-email-validator)
30+
[![Build Status](https://github.com/JoshData/python-email-validator/actions/workflows/test_and_build.yaml/badge.svg)](https://github.com/JoshData/python-email-validator/actions/workflows/test_and_build.yaml)
3131

3232
View the [CHANGELOG / Release Notes](CHANGELOG.md) for the version history of changes in the library. Occasionally this README is ahead of the latest published package --- see the CHANGELOG for details.
3333

0 commit comments

Comments
 (0)