nidhal baccouri commited on
Commit
cdbd59a
·
1 Parent(s): 9b3a5e3

removed tox and added github action workflow

Browse files
Files changed (2) hide show
  1. .github/workflows/build.yml +36 -0
  2. tox.ini +0 -28
.github/workflows/build.yml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ python-version: ["3.7", "3.8"]
11
+
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Set up Python ${{ matrix.python-version }}
15
+ uses: actions/[email protected]
16
+ with:
17
+ python-version: ${{ matrix.python-version }}
18
+
19
+ - name: Install poetry
20
+ run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3
21
+
22
+ - name: Set up cache
23
+ uses: actions/[email protected]
24
+ with:
25
+ path: .venv
26
+ key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
27
+ - name: Install dependencies
28
+ run: |
29
+ source "$HOME/.poetry/env"
30
+ poetry config virtualenvs.in-project true
31
+ poetry install
32
+
33
+ - name: Run tests
34
+ run: |
35
+ source "$HOME/.poetry/env"
36
+ poetry run pytest
tox.ini DELETED
@@ -1,28 +0,0 @@
1
- [tox]
2
- envlist = py37, py38, flake8
3
-
4
- [travis]
5
- python =
6
- 3.8: py38
7
- 3.7: py37
8
- #3.5: py35
9
- #3.4: py34
10
-
11
-
12
- [testenv:flake8]
13
- basepython = python
14
- deps = flake8
15
- commands = flake8 deep_translator tests
16
-
17
- [testenv]
18
- setenv =
19
- PYTHONPATH = {toxinidir}
20
- deps =
21
- -r{toxinidir}/requirements_dev.txt
22
- ; If you want to make tox run the tests with the same versions, create a
23
- ; requirements.txt with the pinned versions and uncomment the following line:
24
- ; -r{toxinidir}/requirements.txt
25
- commands =
26
- pip install -U pip
27
- pytest --basetemp={envtmpdir}
28
-