Skip to content

CI: Migrate from Travis to GitHub Actions #429

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

Merged
merged 9 commits into from
Nov 9, 2021

Conversation

HarshCasper
Copy link
Member

Description

This PR:

  • Deletes the existing .travis.yml
  • Adds a GHA job to build and test
  • Adds a GHA step for uploading coverage to Codecov
  • Runs CI on Python 3.7, 3.8, 3.9, 3.10
  • Builds and tests documentation on Sphinx

@czgdp1807
Copy link
Member

The codecov bot hasn't made a comment.

@codecov
Copy link

codecov bot commented Nov 3, 2021

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%) ⬆️
...datastructs/linear_data_structures/linked_lists.py 99.191% <0.000%> (+0.269%) ⬆️
pydatastructs/trees/heaps.py 98.009% <0.000%> (+0.522%) ⬆️

Impacted file tree graph

@HarshCasper
Copy link
Member Author

@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
Copy link
Member Author

@czgdp1807 It works 😄

@czgdp1807
Copy link
Member

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
Copy link
Member Author

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
Copy link
Member

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

@czgdp1807 czgdp1807 closed this Nov 4, 2021
@czgdp1807 czgdp1807 reopened this Nov 4, 2021
@czgdp1807 czgdp1807 closed this Nov 4, 2021
@czgdp1807 czgdp1807 reopened this Nov 4, 2021
@czgdp1807
Copy link
Member

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
Copy link
Member Author

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

@czgdp1807
Copy link
Member

Okay. Lets do that for now.

@HarshCasper
Copy link
Member Author

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 czgdp1807 merged commit 2a89817 into codezonediitj:master Nov 9, 2021
@czgdp1807
Copy link
Member

Thanks @HarshCasper for this.

@czgdp1807
Copy link
Member

czgdp1807 commented Nov 9, 2021

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
Copy link
Member Author

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?

@HarshCasper HarshCasper deleted the gha-migration branch November 9, 2021 07:14
@czgdp1807
Copy link
Member

Should I also add Flake8 and format code using Black?

N.B. - #324 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants