Skip to content
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

Use pytest on CI #252

Merged
merged 4 commits into from
Jun 10, 2021
Merged

Use pytest on CI #252

merged 4 commits into from
Jun 10, 2021

Conversation

anjensan
Copy link
Contributor

@anjensan anjensan commented May 7, 2021

Run unit tests on CI (github actions) via 'pytest'
Also attach pytest html report as zipped html file (contains tests duration & nice grouped output).

@anjensan anjensan requested review from iwko and beczkowb and removed request for iwko May 7, 2021 12:07
@anjensan anjensan marked this pull request as draft May 11, 2021 10:06
@anjensan anjensan marked this pull request as ready for review May 11, 2021 11:11
@anjensan anjensan marked this pull request as draft May 11, 2021 11:11
- uses: actions/checkout@v2
- name: Set up Python 3.7

- name: Checkout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this step?

Copy link
Contributor Author

@anjensan anjensan Jun 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not add a new step, just add name to it "Run actions/checkout@v2" => "Checkout"

- name: Setup docker
run: |
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic test"
sudo apt update
sudo apt install docker-ce
sudo apt install docker-ce docker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker-ce is not enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, fixed

@@ -54,6 +54,7 @@ def test_check_dataflow_conflicts(self):

@mock.patch('bigflow.build.dataflow.dependency_checker.detect_py_version')
@mock.patch('bigflow.build.spec.get_project_spec')
@unittest.skip("too slow - tmp disable")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -209,7 +209,7 @@ def run_process(
duration = time.time() - start
logger.debug("done in %s seconds, code %d", format(duration, ".2f"), process.returncode)

return stdout
return stdout + "bad"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this suffix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is an intentional break.

@anjensan anjensan force-pushed the aj-use-pytest branch 2 times, most recently from e6035c1 to feff69d Compare June 7, 2021 15:51
@anjensan anjensan marked this pull request as ready for review June 7, 2021 16:33
@anjensan anjensan requested a review from iwko June 7, 2021 16:40
@anjensan anjensan merged commit 9fcc5a7 into master Jun 10, 2021
@anjensan anjensan linked an issue Jun 10, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to 'pytest' as a runner for unit tests
3 participants