Skip to content

Commit 65b4c45

Browse files
authored
Swap from Travis to GitHub Actions (#55)
Signed-off-by: David ML Brown Jr <dmlb2000@gmail.com>
1 parent fc0bc9b commit 65b4c45

File tree

4 files changed

+76
-61
lines changed

4 files changed

+76
-61
lines changed

.github/workflows/pre-commit.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-python@v2
14+
- uses: pre-commit/action@v2.0.3

.github/workflows/pytest.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run PyTest
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, macos-latest, windows-latest]
13+
python-version: ['3.8', '3.9', '3.10']
14+
exclude:
15+
- os: macos-latest
16+
python-version: '3.8'
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Display Python version
24+
run: |
25+
python --version
26+
pip --version
27+
pip install coverage pep257 pre-commit pylint pytest readthedocs-sphinx-ext recommonmark setuptools sphinx sphinx-rtd-theme
28+
pip install .
29+
cd tests
30+
coverage run --include='*/site-packages/jsonpath2/*' --omit='*/site-packages/jsonpath2/parser/JSONPath*' -m pytest -xv
31+
coverage report -m --fail-under 100
32+
cd ..
33+
python setup.py bdist_wheel
34+
python setup.py sdist

.github/workflows/sphinx.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
jobs:
2+
build:
3+
runs-on: ${{ matrix.os }}
4+
strategy:
5+
matrix:
6+
os: [ubuntu-latest, macos-latest, windows-latest]
7+
python-version: ['3.8', '3.9', '3.10',]
8+
exclude:
9+
- os: macos-latest
10+
python-version: '3.8'
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Display Python version
19+
run: |
20+
python --version
21+
pip --version
22+
pip install coverage pep257 pre-commit pylint pytest readthedocs-sphinx-ext recommonmark setuptools sphinx sphinx-rtd-theme
23+
pip install .
24+
cd docs
25+
sphinx-build -T -E -b readthedocs -d _build/doctrees-readthedocs -D language=en . _build/html
26+
sphinx-build -T -b readthedocssinglehtmllocalmedia -d _build/doctrees-readthedocssinglehtmllocalmedia -D language=en . _build/localmedia
27+
sphinx-build -b latex -D language=en -d _build/doctrees . _build/latex
28+
sphinx-build -T -b epub -d _build/doctrees-epub -D language=en . _build/epub

.travis.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)