Skip to content

Commit 784f30a

Browse files
committed
Add github actions CI
1 parent 22251fa commit 784f30a

File tree

3 files changed

+118
-0
lines changed

3 files changed

+118
-0
lines changed

.github/workflows/test-linux.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Linux tests
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
pull_request:
9+
branches:
10+
- develop
11+
12+
jobs:
13+
build:
14+
name: Linux Py${{ matrix.PYTHON_VERSION }}
15+
runs-on: ubuntu-latest
16+
env:
17+
OS: 'linux'
18+
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
PYTHON_VERSION: ['3.8', '3.7', '3.6', '2.7']
23+
steps:
24+
- uses: actions/cache@v1
25+
with:
26+
path: ~/.cache/pip
27+
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
28+
restore-keys: ${{ runner.os }}-pip-
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-python@v2
31+
with:
32+
python-version: ${{ matrix.PYTHON_VERSION }}
33+
architecture: 'x64'
34+
- name: Create Jedi environment for testing
35+
if: matrix.PYTHON_VERSION != '2.7'
36+
run: |
37+
python3 -m venv /tmp/pyenv
38+
/tmp/pyenv/bin/python -m pip install loghub
39+
- run: pip install -e .[all] .[test]
40+
- run: py.test -v test/
41+
- run: pylint pyls test
42+
- run: pycodestyle pyls test
43+
- run: pyflakes pyls test

.github/workflows/test-mac.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Mac tests
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
pull_request:
9+
branches:
10+
- develop
11+
12+
jobs:
13+
build:
14+
name: Mac Py${{ matrix.PYTHON_VERSION }}
15+
runs-on: macos-latest
16+
env:
17+
OS: 'macos'
18+
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
PYTHON_VERSION: ['3.8', '3.7', '3.6', '2.7']
23+
steps:
24+
- uses: actions/cache@v1
25+
with:
26+
path: ~/Library/Caches/pip
27+
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
28+
restore-keys: ${{ runner.os }}-pip-
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-python@v2
31+
with:
32+
python-version: ${{ matrix.PYTHON_VERSION }}
33+
architecture: 'x64'
34+
- name: Create Jedi environment for testing
35+
if: matrix.PYTHON_VERSION != '2.7'
36+
run: |
37+
python3 -m venv /tmp/pyenv
38+
/tmp/pyenv/bin/python -m pip install loghub
39+
- run: pip install -e .[all] .[test]
40+
- run: py.test -v test/

.github/workflows/test-win.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Windows tests
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
pull_request:
9+
branches:
10+
- develop
11+
12+
jobs:
13+
build:
14+
name: Win Py${{ matrix.PYTHON_VERSION }}
15+
runs-on: windows-latest
16+
env:
17+
OS: 'win'
18+
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
PYTHON_VERSION: ['3.8', '3.7', '3.6', '2.7']
23+
steps:
24+
- uses: actions/cache@v1
25+
with:
26+
path: ~\AppData\Local\pip\Cache
27+
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
28+
restore-keys: ${{ runner.os }}-pip-
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-python@v2
31+
with:
32+
python-version: ${{ matrix.PYTHON_VERSION }}
33+
architecture: 'x64'
34+
- run: pip install -e .[all] .[test]
35+
- run: py.test -v test/

0 commit comments

Comments
 (0)