Browse Source

added pypi stage to CI

gwillz 3 years ago
parent
commit
d40deabb34
3 changed files with 45 additions and 23 deletions
  1. 43 23
      .gitlab-ci.yml
  2. 2 0
      MANIFEST.in
  3. 0 0
      requirements.txt

+ 43 - 23
.gitlab-ci.yml

@@ -1,37 +1,42 @@
 
-build:py2:
- stage: build
+stages:
+ - test
+ - docs
+ - build
+ - deploy
+
+epydoc:
+ stage: docs
+ only:
+ - master
+ artifacts:
+  paths:
+  - html/
  tags:
  - python2
  - linux
  script:
- - python2 setup.py build
- - python2 setup.py install --user
+ - wget https://git.gwillz.com.au/snippets/9/raw -O doc-style.css -q
+ - >-
+   epydoc --no-sourcecode --no-frames --output html --simple-term -vv
+   --inheritance grouped --css doc-style.css
+   --name 'Async Events' avent
 
-build:py3:
+pypi:
  stage: build
+ only:
+ - master
+ artifacts:
+  paths:
+  - dist/
+ dependencies:
+ - epydoc
  tags:
  - python3
  - linux
  script:
- - python3 setup.py build
- - python3 setup.py install --user
+ - python3 setup.py bdist_wheel --universal
 
-deploy-api:
- stage: deploy
- tags:
- - python2
- - linux
- - mk2-docs
- allow_failure: true
- script:
- - wget https://git.gwillz.com.au/snippets/9/raw -O doc-style.css -q
- - >-
-   epydoc --no-sourcecode --no-frames --output html --simple-term -vv
-   --inheritance grouped --css doc-style.css
-   --name 'Async Events' avent
- - cp html/* -r /srv/api/avent
- 
 lint:py2:
  stage: test
  tags:
@@ -50,7 +55,7 @@ lint:py3:
  - wget https://git.gwillz.com.au/snippets/8/raw -O mk2pylint.cfg -q
  - python3 -m pylint --rcfile=mk2pylint.cfg avent --reports=no || [[ $(($? & 3)) == 0 ]]
 
-test:
+units:
  stage: test
  tags:
  - python3
@@ -58,3 +63,18 @@ test:
  script:
  - python3 -Bm coverage run -m unittest tests
  - python3 -Bm coverage report -m
+
+deploy:
+ stage: deploy
+ allow_failure: true
+ dependencies:
+ - epydoc
+ - pypi
+ only:
+ - master
+ tags:
+ - linux
+ - mk2-docs
+ script:
+ - cp -r html/* /srv/api/avent
+ - cp dist/*.whl /srv/pypi/packages/avent

+ 2 - 0
MANIFEST.in

@@ -0,0 +1,2 @@
+include README.md
+include html/*

+ 0 - 0
requirements.txt