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

On Continuous Integration #32

Open
felix91gr opened this issue Jun 5, 2018 · 8 comments
Open

On Continuous Integration #32

felix91gr opened this issue Jun 5, 2018 · 8 comments
Labels
to-do General tag for tasks we plan to do, s.t. we don't forget to.

Comments

@felix91gr
Copy link
Owner

@vknabel had a really great idea about how to add CI such that we could test the projects both periodically and before merging a PR, to see that they worked on both Darwin and Linux.

These are the benefits:

  • This helps us maintain our goal of listing cross-platform libraries.
  • This helps a contributor (and us!) know what might be missing in a newly added project, instantly and with extensive feedback.

And this is (more or less) the idea as I can recall it:

  • Parse the document for links, and check if the repo has the structure of a Swift SPM project. If not, whatevs.
  • If yes, then download it and run swift test. Collect the results (passed/total and console output) into a list.
  • Display the results in the PR.

This would be enhanced by tools such as that described by #31

@felix91gr felix91gr added the to-do General tag for tasks we plan to do, s.t. we don't forget to. label Jun 5, 2018
@vknabel
Copy link
Collaborator

vknabel commented Jun 5, 2018

A draft of the current approach is located here:
vknabel/awesome-system-swift#1

The problem is using danger swift: I could not get it running https://travis-ci.org/vknabel/awesome-system-swift/builds/370196293

@felix91gr
Copy link
Owner Author

(Sorry if my writing has been sloppy, when I wrote these issues I was very tired)

Do you think it's possible to do this? Tell me where can I help you :)

@vknabel
Copy link
Collaborator

vknabel commented Jun 6, 2018

(Sorry if my writing has been sloppy, when I wrote these issues I was very tired)

No worries :)

I got Danger-Swift to work for now.
Though I use NSURLConnection.sendSynchronousRequest in order to download the pr-diffs.
Sadly it is not available on linux. Can you have a look on this?

https://github.com/vknabel/CompatabilityDetection/blob/master/Sources/CompatabilityDetection/CompatabilityDetection.swift#L95-L100

@felix91gr
Copy link
Owner Author

Awesome!

And,

Can you have a look on this?

Sure :) I have to leave for class soon, but I'll be back later. I'll check it out then!

@felix91gr
Copy link
Owner Author

That function seems to be deprecated, take a look at this.

I'm going to check out what the Web projects like Vapor and Kitura do. In the case there's nothing Swift-based we could use (which I don't believe is likely), we at least have the CCUrl wrapper that IBM made as a last resort.

@felix91gr
Copy link
Owner Author

Huh. Seems like the entire NSURLConnection API is getting slowly deprecated. The replacement for it is based around URLSession, which in the corelibs-foundation repo seems to be mostly complete (open and then Ctrl + F: "urlsession" for the details). Do you think we could use that instead?

@felix91gr
Copy link
Owner Author

As an alternative, I've found Vapor's HTTPRequest. Since Vapor's API is 100% implememted, that's a solid option if the corelibs-foundation alternative can't be used.

@vknabel
Copy link
Collaborator

vknabel commented Jun 7, 2018

Thanks a lot. I used URLSession and semaphores to get the synchronous behavior.

My testing PR did actually pass. 🎉
Now I need to start playing around and improve some parts (compile errors should fail, but missing tests should just warn)

vknabel added a commit that referenced this issue Jun 8, 2018
@vknabel vknabel mentioned this issue Jun 8, 2018
4 tasks
felix91gr pushed a commit that referenced this issue Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to-do General tag for tasks we plan to do, s.t. we don't forget to.
Projects
None yet
Development

No branches or pull requests

2 participants