Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Add travis CI script #20

Merged
merged 2 commits into from
Mar 24, 2017
Merged

Add travis CI script #20

merged 2 commits into from
Mar 24, 2017

Conversation

am11
Copy link

@am11 am11 commented Mar 5, 2017

Uses dotnet-cli v1.0.0-rc4-004771 without mono to specifically
build netstandard1.6 TFM.

Progress towards #14.

@am11 am11 force-pushed the master branch 4 times, most recently from 1454b68 to 1e658b0 Compare March 5, 2017 02:04
@am11
Copy link
Author

am11 commented Mar 5, 2017

@felschr, in my fork, current the build succeeds but the job fails at the step where it tries to push the tag: https://travis-ci.org/am11/AspNetCore.Identity.DocumentDB/builds/207810945#L554.
Shouldn't it be the other way around? Like when you will push a release tag, only then the CI job should upload the release assets? Something like: https://docs.travis-ci.com/user/deployment/releases/:

(however, this can be done va AppVeyor only, as the assembly we are producing here is platform agnostic / pure-MSIL)

@felschr
Copy link
Owner

felschr commented Mar 5, 2017

Could you shortly explain why this Travis CI build would be useful in addition to the AppVeyor build?

The AppVeyor build is already building for net451 and netstandard1.6.

@am11
Copy link
Author

am11 commented Mar 5, 2017

Hey @felschr!
I took the .travis.yml from your netcore branch and fixed it for dotnet-cli RC4 and version extraction from csproj. Is that meant to be deprecated / removed?

Usually repos have both AppVeyor and TravisCI configured, to keep ensuring the xplat-ness and step aside related issue before they emerge in public landscape. For instance, unless we re-read the documentation of .NET BCL APIs that we have been using for ages, we never know which API will throw PlatformNotSupportedException on Unix, while developing a cross-platform library on Windows.

In README, I read:

Microsoft.Azure.DocumentDB v1.10.0 - supports net45 (netstandard support is in development)

I am planning to consume this package for the app running on Unix, knowing Azure has released the DocDB package supporting .NET Core. So I cloned your repo and found that you already have the support in master branch.

@felschr
Copy link
Owner

felschr commented Mar 5, 2017

I see.
The problem is that the Travis CI script isn't running the unit and integration tests, it's just running the build.
As AppVeyor already creates the build we can remove the Git/Github tag/release publishing from the Travis CI completely.

So we should try to find a way to run the tests on Travis CI. Or rather find a way to run the tests on a Linux machine. Am I right?

@am11
Copy link
Author

am11 commented Mar 5, 2017

@felschr, I agree that we must be able to run tests. Unfortunately, DocDB emulator is only available on Windows; native Unix support is on their long-term roadmap https://docs.microsoft.com/en-us/azure/documentdb/documentdb-nosql-local-emulator (see comments).

We can use xunit traits to disable the affected tests for non-Windows for now, but there are only few such tests.

@felschr felschr added this to the 1.0 milestone Mar 15, 2017
@felschr
Copy link
Owner

felschr commented Mar 22, 2017

Sounds good.
Do you want to create a new pull request for a script that runs the tests (it's ok when it fails initially) and does not create a Git tag or should I create one?

@felschr felschr requested review from felschr and removed request for felschr March 22, 2017 15:16
Uses dotnet-cli `v1.0.0-rc4-004771` without `mono` to specifically
build `netstandard1.6` TFM.
@am11
Copy link
Author

am11 commented Mar 23, 2017

@felschr, done. Can you please take a look?

Copy link
Owner

@felschr felschr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git tag creation and GitHub release could probably be removed.
Otherwise, it looks good. I'll check the Git/Github behavior later.

@felschr felschr merged commit a878ab8 into felschr:master Mar 24, 2017
@felschr
Copy link
Owner

felschr commented Mar 24, 2017

Ok, everything looks quite ok.
The build(s) still behave somewhat strange now which could be fixed.

  1. The Travis CI master build finished first but failed during the git tag creation with:
    fatal: Authentication failed for 'https://@github.com/FelschR/AspNetCore.Identity.DocumentDB.git/'
  2. The AppVeyor master build finished successfully afterward.
  3. Then the Travis CI v0.3.0-beta-master-15 (tag) build was (re)triggered and finished successfully.

The 2nd Travis CI build is successful because it skips the git tag creation because the commit was now tagged by AppVeyor.

The question is now:
Should we just remove git/Github tag/release creation in the Travis CI build at all? Or just use Travis as to run the tests in a Linux environment.
I can't think of any reason why it would be crucial.

@am11
Copy link
Author

am11 commented Mar 24, 2017

Perhaps it was the first time on the master branch and some Travis<->GitHub syncing failed? Might be the intermittent error?
Should we wait a bit and if this problem persists, then remove the tag?

On a slightly related note, the TravisCI badge in the README has link to netcore branch. Perhaps we can apply the following patch:

- [![Travis CI build status](https://travis-ci.org/FelschR/aspnetcore-identity-documentdb.svg?branch=netcore)](https://travis-ci.org/FelschR/aspnetcore-identity-documentdb?branch=netcore)

+ [![Travis CI build status](https://travis-ci.org/FelschR/aspnetcore-identity-documentdb.svg?branch=netcore)](https://travis-ci.org/FelschR/AspNetCore.Identity.DocumentDB)

Also, I was thinking to add macOS and Mono (requires separate SLN with old-CSPROJ facade) to the matrix by extracting out the script to a separate .sh file, like what we did here: https://github.com/maxmind/MaxMind-DB-Reader-dotnet/blob/9d247d7/.travis.yml. :)

@am11 am11 deleted the master branch March 24, 2017 13:20
@felschr
Copy link
Owner

felschr commented May 30, 2017

Just did a build and noticed the same thing again: first build failed with Github error, 2nd went through.
I'll have to look into that later.

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

Successfully merging this pull request may close these issues.

None yet

2 participants