-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 2.08 KB
/
main.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
74
75
76
77
78
79
80
81
82
name: CI
on:
push:
branches:
- master
pull_request: # PR
workflow_dispatch: # manual
env:
PYENV_ROOT: /home/runner/.pyenv
jobs:
build:
runs-on: ubuntu-latest
env:
TRAVIS: 'true' # Skip tests requiring data
strategy:
fail-fast: false
matrix:
python-version:
- '2.7' # production
- '3.9'
- '3.10'
mongodb-version:
- 2
name: Python ${{ matrix.python-version }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install pyenv
run: |
curl https://pyenv.run | bash
echo "$PYENV_ROOT/bin" >> $GITHUB_PATH
echo "$PYENV_ROOT/shims" >> $GITHUB_PATH
- name: Install Python ${{ matrix.python-version }}
run: |
pyenv install ${{ matrix.python-version }}
pyenv global ${{ matrix.python-version }}
pip install --upgrade pip setuptools wheel
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-replica-set: test-rs
- name: Install dependencies
run: |
export ROOT_DIR_SRC=${{github.workspace}}/..
cd $ROOT_DIR_SRC
pip install https://files.pythonhosted.org/packages/3e/5c/2867e46f03d2fcc3d014a02eeb11ec55f3f8d9eddddcc5578ae8457f84f8/ERPpeek-1.7.1-py2.py3-none-any.whl
pip install pytest-cov pytest
cd ${{github.workspace}}
pip install -e .
- uses: BSFishy/pip-action@v1
with:
packages: |
coveralls
- name: Unit tests
run: |
pytest
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit tests
coveralls_finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true