-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (67 loc) · 2.56 KB
/
xmsconan-ci.yaml
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
name: xmsconan
on: [push, pull_request]
jobs:
flake:
name: Flake Project
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
python-version: ["3.10"]
steps:
# Checkout Sources
- name: Checkout Source
uses: actions/checkout@v2
# Setup Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install Python Dependencies
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 flake8-docstrings flake8-bugbear flake8-import-order pep8-naming
# Flake Code
- name: Run Flake
run: |
flake8 --exclude .tox,.git,__pycache__,_package/tests/files/*,pydocs/source/conf.py,build,dist,tests/fixtures/*,*.pyc,*.egg-info,.cache,.eggs --ignore=D200,D212 --max-line-length=120 --docstring-convention google --isolated --import-order-style=appnexus --application-import-names=xmsconan --application-package-names=xms --count --statistics .
publish:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-18.04]
python-version: ["3.10"]
steps:
# Checkout Sources
- name: Checkout Source
uses: actions/checkout@v2
# Setup Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install Python Dependencies
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install wheel setuptools devpi
# Get Tag Name
- name: Get Tag
id: gitTag
uses: little-core-labs/get-git-tag@v3.0.2
# Check Tag
- name: Check Tag Against Version
run: |
python -c "from xmsconan import __version__; print('Version: ' + str(__version__) + '\Tag: ${{ steps.gitTag.outputs.tag }}')"
python -c "from xmsconan import __version__; exit(0 if __version__ == '${{ steps.gitTag.outputs.tag }}' else 1)"
# Build Wheel
- name: Build Wheel and Upload
run: |
python setup.py bdist_wheel
devpi use https://public.aquapi.aquaveo.com/aquaveo/stable/
devpi login ${{ secrets.AQUAPI_USERNAME_SECRET }} --password ${{ secrets.AQUAPI_PASSWORD_SECRET }}
devpi upload --from-dir dist