-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CICD Improvements #101
CICD Improvements #101
Changes from 11 commits
71f12ff
a106b2f
ae59a2c
701eb0c
8a9e383
415475a
82a73f1
891836a
351a33a
756db3d
61b12bc
1c5589c
7259d93
a232de6
f0122aa
235860c
a14f862
4818c3e
170b229
4f28168
d34c4b7
fb1b835
950af97
b47ade3
0014633
f299da7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Hera PR build | |
on: pull_request | ||
|
||
jobs: | ||
hera-pr-build: | ||
build-linux: | ||
|
||
timeout-minutes: 10 | ||
|
||
|
@@ -25,7 +25,7 @@ jobs: | |
|
||
- name: Install base dependencies | ||
run: | | ||
python -m pip install --upgrade "tox<4.0" | ||
python -m pip install --upgrade "tox<4.0" tox-wheel twine | ||
|
||
- name: Run lint | ||
env: | ||
|
@@ -41,6 +41,93 @@ jobs: | |
|
||
- name: Run tests | ||
env: | ||
ENABLE_BDIST_EXT_MODULE: 'yes' | ||
TOXENV: python${{ matrix.python-version }} | ||
run: | | ||
tox | ||
|
||
- name: Check build | ||
run: | | ||
twine check .tox/dist/* | ||
|
||
- name: upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: pypi-build-arts | ||
path: .tox/dist | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to publish the constructed distributions as artifacts. To be clear, these are different than the actually published package, correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not quite. If we consolidate to a single GH workflow like I suggested, the HOWEVER ! what's usually done, is building |
||
|
||
- name: upload coverage files | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage-data | ||
path: ".tox/.coverage.*" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the publication of coverage files allow one to construct a test coverage GitHub badge? I am a bit unfamiliar with the necessary setup of coverage so I am very excited this is added, and I would love to see the report on the main repo README! I must say a direct thank you here, as a comment, for the efforts 🚀 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With pleasure. Yes, we are definitely going for a n honorable shield. See There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great 👍 |
||
|
||
coverage: | ||
needs: [build-linux] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
|
||
- name: get coverage files | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: coverage-data | ||
path: .tox | ||
|
||
- name: list coverage files | ||
run: | | ||
find .tox -name ".coverage*" | ||
|
||
- name: install tox | ||
run: | | ||
python -m pip install --upgrade tox | ||
|
||
- name: create coverage report | ||
env: | ||
TOXENV: coverage | ||
run: | | ||
tox | ||
|
||
- name: upload coverage HTML report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: html-report | ||
path: .tox/htmlcov | ||
|
||
publish: | ||
needs: [coverage] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
|
||
- name: get pypi build arts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: pypi-build-arts | ||
path: dist | ||
|
||
- name: list pypi build arts | ||
run: | | ||
ls -la dist/ | ||
|
||
- name: install twine | ||
run: | | ||
python -m pip install --upgrade twine | ||
|
||
- name: Check build | ||
run: | | ||
twine check dist/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a check of the built distribution published via the PR, correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. EDITED Yes. It's not published though. It's uploaded, and then downloaded in |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ and its crew were specially protected by the goddess Hera. | |
|
||
[![Build](https://github.com/argoproj-labs/hera-workflows/actions/workflows/hera_build_and_publish.yaml/badge.svg)](https://github.com/argoproj-labs/hera-workflows/blob/main/.github/workflows/hera_build_and_publish.yaml) | ||
[![Pypi](https://img.shields.io/pypi/v/hera-workflows.svg)](https://pypi.python.org/pypi/hera-workflows) | ||
[![CondaForge](https://img.shields.io/conda/v/conda-forge/hera-workflows.svg)](https://anaconda.org/conda-forge/hera-workflows) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚀 |
||
[![Downloads](https://pepy.tech/badge/hera-workflows)](https://pepy.tech/project/hera-workflows) | ||
[![Downloads/month](https://pepy.tech/badge/hera-workflows/month)](https://pepy.tech/project/hera-workflows) | ||
[![Downloads/week](https://pepy.tech/badge/hera-workflows/week)](https://pepy.tech/project/hera-workflows) | ||
|
@@ -94,12 +95,24 @@ In you activated `pipenv` shell, you can utilize the tasks found in `Makefile`, | |
make test | ||
``` | ||
|
||
To run tests on all supported python versions run [tox](https://tox.wiki/en/latest/): | ||
To run tests on all supported python versions with coverage run [tox](https://tox.wiki/en/latest/): | ||
|
||
```shell | ||
tox | ||
``` | ||
|
||
To run tests for a specific python version with coverage run: | ||
|
||
```shell | ||
tox -e python3.7 coverage | ||
``` | ||
|
||
To list all available `tox` envs run: | ||
|
||
```shell | ||
tox -a | ||
``` | ||
|
||
> See project `tox.ini` for more details | ||
harelwa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Also, see the [contributing guide](https://github.com/argoproj-labs/hera-workflows/blob/main/CONTRIBUTING.md)! | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the job name representative of the distribution that is going to be built? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand - by distribution you mean linux ?
Is this question maybe related to #101 (comment) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you for clarifying! 🙂