codezonediitj / pydatastructs

A python package for data structures and algorithms
https://pydatastructs.readthedocs.io/en/stable/
Other
199 stars 269 forks source link

CI: Migrate from Travis to GitHub Actions #429

Closed HarshCasper closed 2 years ago

HarshCasper commented 2 years ago

Description

This PR:

czgdp1807 commented 2 years ago

The codecov bot hasn't made a comment.

codecov[bot] commented 2 years ago

Codecov Report

Merging #429 (7dea8b7) into master (bae1020) will increase coverage by 0.055%. The diff coverage is n/a.

@@              Coverage Diff              @@
##            master      #429       +/-   ##
=============================================
+ Coverage   98.573%   98.629%   +0.055%     
=============================================
  Files           29        29               
  Lines         3646      3649        +3     
=============================================
+ Hits          3594      3599        +5     
+ Misses          52        50        -2     
Impacted Files Coverage Δ
pydatastructs/graphs/algorithms.py 99.491% <0.000%> (+0.001%) :arrow_up:
...datastructs/linear_data_structures/linked_lists.py 99.191% <0.000%> (+0.269%) :arrow_up:
pydatastructs/trees/heaps.py 98.009% <0.000%> (+0.522%) :arrow_up:

Impacted file tree graph

HarshCasper commented 2 years ago

@czgdp1807 The Windows and macOS tests were failing because of an action that I was using to build docs that was only compatible with Linux. The CI should work fine now.

HarshCasper commented 2 years ago

@czgdp1807 It works :smile:

czgdp1807 commented 2 years ago

Yeah. Great work. Is there anything we can do to add a timeout using secrets? Let me know if I need to set an environment variable in my Github account.

HarshCasper commented 2 years ago

Hi @czgdp1807

I have added a timeout secret. To set up a secret, go to your Repository Settings page, then select Secrets. You can add a secret named TIMEOUT_MINUTES and provide a strict numerical value in minutes denoting the maximum time for which the workflow should run.

You can kick-start the CI once again and we will see if its working as per our expectations :)

czgdp1807 commented 2 years ago

Tests don't seem to start. I have added the secret though.

czgdp1807 commented 2 years ago

The error,

Invalid workflow file : .github/workflows/ci.yml#L12
The workflow is not valid. .github/workflows/ci.yml (Line: 12, Col: 22): Unrecognized named-value: 'TIMEOUT_MINUTES'. Located at position 1 within expression: TIMEOUT_MINUTES .github/workflows/ci.yml (Line: 12, Col: 22): Unexpected value '${{ TIMEOUT_MINUTES }}'
HarshCasper commented 2 years ago

@czgdp1807 Seems like we cannot add a secret as a job value. We have to define it manually here.

czgdp1807 commented 2 years ago

Okay. Lets do that for now.

HarshCasper commented 2 years ago

Hi @czgdp1807

Apologies for the delay. I have set the timeout minutes. Let me know if you wish to have further changes or need the commits to be squashed before merging. Thanks!

czgdp1807 commented 2 years ago

Thanks @HarshCasper for this.

czgdp1807 commented 2 years ago

The badge in the README needs to be updated though. As of now it uses to Travis CI for showing, build:passing. It should use Github Actions now. Could you make a follow up PR for that? @HarshCasper

HarshCasper commented 2 years ago

I will make a follow-up PR for that. Should I also add Flake8 and format code using Black? It would be a comparatively larger PR and I would like to know if you would be okay with that?

czgdp1807 commented 2 years ago

Should I also add Flake8 and format code using Black?

N.B. - https://github.com/codezonediitj/pydatastructs/pull/324#issuecomment-948802930