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

Adds configuration to use github actions for testing. #123

Merged
merged 5 commits into from
Jul 28, 2021

Conversation

moorepants
Copy link
Collaborator

@moorepants moorepants commented Jul 28, 2021

Fixes #120

@brocksam
Copy link
Collaborator

brocksam commented Jul 28, 2021

Hi @moorepants, not sure if you've done GitHub Actions with conda before, but I've found that a different approach was required to get CI working with conda than previously used with Travis.

You could try something like:

steps:
  - name: Checkout CyIpopt
    uses: actions/checkout@v2
  - uses: conda-incubator/setup-miniconda@v2
    with:
      auto-update-conda: true
      activate-environment: test-environment
      python-version: ${{ matrix.python-version }}
      channels: conda-forge
      conda-build-version: 3.21.4
  - name: Install basic dependencies
    run: # insert conda stuff here
  - name: Install CyIpopt
    run: python setup.py install
  - name: Test with pytest
    run: pytest

See here for useful information: https://github.com/marketplace/actions/setup-miniconda

@moorepants
Copy link
Collaborator Author

I am new to github actions. It seems overly complicated, to be honest. What I've got now runs at least. It could be improved more.

@moorepants
Copy link
Collaborator Author

I'm just going to merge as is. I'm not too keen on this marketplace, as it seems like you give up control of setting up your testing environment exactly the way you want to.

@brocksam
Copy link
Collaborator

I'm just going to merge as is. I'm not too keen on this marketplace, as it seems like you give up control of setting up your testing environment exactly the way you want to.

I've setup GitHub Actions for a couple of projects now and agree that the learning curve was steeper than for other CI platforms. I think the use of certain actions from elsewhere can be helpful is simplifying setting up the automation of tasks beyond simply running the tests.

Happy for this to be merged as is as it's functioning. As you say, can always be extended/improved in future. The important thing is having functioning CI again :)

@moorepants
Copy link
Collaborator Author

Ok, Ill merge for now and we can switch to better implementations later. I am going to have to switch a ton of repos off Travis CI. So I'll learn all this soon it seems.

@moorepants moorepants merged commit d1c8d70 into mechmotum:master Jul 28, 2021
@moorepants moorepants deleted the github-actions branch August 24, 2021 14:12
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 Github Actions
2 participants