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

Refactor/GitHub workflow #2041

Merged
merged 13 commits into from Dec 18, 2020
Merged

Refactor/GitHub workflow #2041

merged 13 commits into from Dec 18, 2020

Conversation

harrysarson
Copy link
Collaborator

Opening this PR to check the on: pull_request workflow.

@josdejong
Copy link
Owner

I've added the browserstack keys to the secrets section of github, all works like a charm. I really like the neat separation in files to run on push vs pull_request.

Should the build.yaml file also run on pull_request?

@harrysarson
Copy link
Collaborator Author

Should the build.yaml file also run on pull_request?

Yes it should.

@josdejong josdejong marked this pull request as ready for review November 30, 2020 20:27
@josdejong
Copy link
Owner

josdejong commented Nov 30, 2020

Thanks for the update Harry.

I'm wondering, it looks like all tasks of build.yml are executed twice: once for push and once for pull_request. Any idea how we can prevent that from happening?

afbeelding

And I guess the "continuous-integration/travis-ci" check is a left over and will be gone after we've merged all.

@harrysarson
Copy link
Collaborator Author

I think that happens because this is both a branch (in the mathjs repo) and a pull request (against the mathjs repo). This would not happen if someone makes a pull request from a fork this workflow would not run twice.

I am not sure if we can stop it running twice for branches that are also pull requests.

@josdejong
Copy link
Owner

Hm. So maybe when you update a PR, push is also triggered? Would it be enough to just trigger build.yml on push after all then, and not both?

@harrysarson
Copy link
Collaborator Author

Would it be enough to just trigger build.yml on push after all then

Not if we want the workflow to run when someone makes a pull request from a fork

@josdejong
Copy link
Owner

Hm, I guess we have too keep it like this though. It's similar to travis where we also had this, right? (only you didn't see this in a single list with all tasks).

So I think we can merge this PR, right @harrysarson ?

@harrysarson
Copy link
Collaborator Author

Hm, I guess we have too keep it like this though.

Currently:

on: [push, pull_request]

We could:

on:
  push:
    branches:
      - develop
      - master
    tags:  
  pull_request:

because any other branch would end up being a pull_request so the build job would get run then.

It's similar to travis where we also had this, right? (only you didn't see this in a single list with all tasks).

Yes, although running less CI jobs is always a good thing if we can do it!

@josdejong
Copy link
Owner

I think the branches: configuration makes sense, we can try it out. What do you think?

@harrysarson
Copy link
Collaborator Author

Oops, I changed the wrong file! Let me fix next time I get to my laptop 😊

@harrysarson
Copy link
Collaborator Author

Do check when this is merged into dev that the build job runs :)

Is it intentional that we do not run CI on nodejs 10?

@josdejong
Copy link
Owner

Do check when this is merged into dev that the build job runs :)

Is it intentional that we do not run CI on nodejs 10?

Ahhh, wait a second. In the old Travis script we have this part:

mathjs/.travis.yml

Lines 14 to 16 in 59aacb4

- script: npm run test:src:transpile
node_js: 10
name: Node 10

So I think my former me made this test:src:transpile script specially for nodejs 10, which is missing some of the newer JavaScript features and requires transpilation before you can run the tests. Argh. So I guess we'll have to add this script again and a Github workflow for it, until end-of-life of nodejs 10, which is coming April 2021.

@harrysarson
Copy link
Collaborator Author

Take a look! We now run special script on node 10. I also tidied the scripts up nicely.

@josdejong
Copy link
Owner

Looks good, nicely solved with the node 10 script, having all logic for this in one place 👍 .

Ready to merge I think?

@harrysarson
Copy link
Collaborator Author

fixes #2024

@harrysarson harrysarson linked an issue Dec 18, 2020 that may be closed by this pull request
@harrysarson
Copy link
Collaborator Author

ready to merge I think

@harrysarson harrysarson reopened this Dec 18, 2020
@josdejong
Copy link
Owner

👍 thanks again!

@josdejong josdejong merged commit 788c0b9 into develop Dec 18, 2020
@josdejong josdejong deleted the refactor/github_workflow branch December 18, 2020 13:37
@harrysarson
Copy link
Collaborator Author

Is good to be back! Merry Christmas Josh, till next time.

@josdejong
Copy link
Owner

It works like a charm, this is awesome 😎

Happy holidays Harry!

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.

Testing with Travis CI very slow lately
2 participants