Skip to content

Setup GitHub Actions v1 - #1068

Merged
austindrenski merged 17 commits into
devfrom
github-actions-v1
Oct 28, 2019
Merged

austindrenski merged 17 commits into
devfrom
github-actions-v1

Conversation

@austindrenski

@austindrenski austindrenski commented Oct 4, 2019 •

Copy link
Copy Markdown
Contributor

Goals for v1:

  • Run tests
  • Create packages
  • Upload artifacts
  • Deploy to MyGet

Punted for v2:

  • Deploy to GitHub Package Registry (GPR)
  • Deploy to NuGet
  • Draft GitHub releases
  • Publish GitHub releases

Should follow #1065 and #1066.

@roji roji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! Can't wait to have this up and running.

Here's a thought on the general workflow structure... This workflow packs everything in the build phase. This means it has to transfer the nupkgs to the publish step via artifacts, which are later shown on the workflow UI although they're of no interest at all. As an alternative, how about we simply pack in the publish phase? This means that we have one Build/Test step - which only builds in debug and runs all the tests. If it succeeds, we move on to publish, which builds in release (as part of dotnet pack) and deploys. No need for intermediate artifacts, plus we build release only once (instead of matrix).

Comment thread .appveyor.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
@austindrenski
austindrenski force-pushed the github-actions-v1 branch 2 times, most recently from 21740ec to af5ed84 Compare October 5, 2019 18:33

@roji roji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it looks even better with the packing happening in the second job - no more need for artifact transfer etc. See remaining comments but overall looks very close to merging.

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
@austindrenski
austindrenski force-pushed the github-actions-v1 branch 7 times, most recently from cabfcb4 to 4005c3e Compare October 7, 2019 21:53
Comment thread .github/workflows/build.yml Resolved
@austindrenski
austindrenski force-pushed the github-actions-v1 branch 3 times, most recently from 428dfb9 to 4b59ef1 Compare October 18, 2019 00:45
@austindrenski

Copy link
Copy Markdown
Contributor Author

@austindrenski

Copy link
Copy Markdown
Contributor Author

Exciting news: that last run successfully published to both MyGet and GPR.

The outstanding question now is whether the packages are being directed to the right sources (from above):

github.ref CI suffix gpr vnext patch nuget
refs/heads/*, excl. refs/heads/hotfix/* ✔ ✔ ✔ ❌ ❌
refs/heads/hotfix/* ✔ ✔ ❌ ✔ ❌
refs/tags/v* ❌ ❌ ❌ ❌ ✔
feed url
gpr https://nuget.pkg.github.com/npgsql/index.json
vnext https://www.myget.org/F/npgsql-unstable/api/v3/index.json
patch https://www.myget.org/F/npgsql/api/v3/index.json
nuget https://api.nuget.org/v3/index.json

@austindrenski
austindrenski requested a review from roji October 18, 2019 01:52
- Change names.
- Restructure workflow.
- Drop extra `--include-symbols` commands.
- Try to inline vars.
- Bring back AppVeyor.
- Let dotnet glob for test/pack/nuget.
- Test v3 feed endpoint for MyGet.
- Add PG 12.
- Update repo URLs.
- Cleanup and fix CI/release version strategy.
- Try to re-enable push to GPR.
- Remove commented section for real nuget publishing (punted).
Scraping the EDB and OSGEO versions resulted in PG 10.10 (vs 10.9),
PG 11.5 (vs 11.4), and PostGIS 2.5.3 (no change).

Not sure why the builds failed, so pinning back to 10.9 and 11.4.

Also including PostGIS 3.0.0 for further testing.
@austindrenski

Copy link
Copy Markdown
Contributor Author

Scraping versions from EDB bumped us from 10.9 to 10.10 and from 11.4 to 11.5. But that broke something with PostGIS (which hasn't changed). Troubleshooting now.

@roji

roji commented Oct 27, 2019

Copy link
Copy Markdown
Member

If we've addressed your earlier concerns, I say let's do it +1

Ahaha, you got me... I guess since I wrote that I'm more comfortable with just switching over, as long as everything works :)

@roji

roji commented Oct 27, 2019

Copy link
Copy Markdown
Member

BTW maybe it's worth checking PG12 again...

Testing multiple extension versions is a cool idea, but it adds
another dimension to the build matrix, which could be acceptable,
except that OSGEO also doesn't provide binaries for use with PG 12.

Unless someone finds a serious enough incompatibility, it's
probably a better use of our time to focus on testing multiple server
versions rather than extension versions.
@austindrenski
austindrenski force-pushed the github-actions-v1 branch 2 times, most recently from bd53256 to abdc47a Compare October 28, 2019 03:28
@austindrenski

austindrenski commented Oct 28, 2019 •

Copy link
Copy Markdown
Contributor Author

BTW maybe it's worth checking PG12 again...

Added, but a couple of tests fail in 12 😢

  [xUnit.net 00:02:19.85] Npgsql.EntityFrameworkCore.PostgreSQL.Query.SimpleQueryNpgsqlTest.Indexof_with_emptystring(isAsync: False) [FAIL]
  [xUnit.net 00:02:19.86] Npgsql.EntityFrameworkCore.PostgreSQL.Query.SimpleQueryNpgsqlTest.Indexof_with_emptystring(isAsync: True) [FAIL]
    Error Message:
     Assert.Equal() Failure
  Expected: 0
  Actual:   -1

Not sure why this only fails in 12, but according to the docs, we should probably be returning zero:

If value is Empty, the return value is 0.

@austindrenski

Copy link
Copy Markdown
Contributor Author

OH. This doesn't fail under PG11 because there's a (breaking?) change in behavior:

Per PostgreSQL 11:

=> select strpos('test', '');
 strpos
--------
      1
(1 row)

Per PostgreSQL 12:

=> select strpos('test', '');
 strpos
--------
      0
(1 row)

Haven't found this documented anywhere yet....

@roji

roji commented Oct 28, 2019

Copy link
Copy Markdown
Member

Interesting...

For PG 12, if lots of stuff is failing we can defer it for later. Or you can ignore the problematic tests and open issue(s) to fix for 3.1. It would be best to merge this PR ASAP, so I'd rather not block it.

For the strpos behavior difference, have you raised this with pg-hackers (if so link)? Do you prefer for me to do it?

@austindrenski

Copy link
Copy Markdown
Contributor Author

That last commit addressed the PG12 failures, so we should be good to merge now.

I haven't emailed pg-hackers yet, and probably won't have time today. If you've got some time to confirm you can repro it too, feel free to email them.

@austindrenski
austindrenski merged commit 4ee8a0c into dev Oct 28, 2019
@delete-merged-branch
delete-merged-branch Bot deleted the github-actions-v1 branch October 28, 2019 12:48
@roji

roji commented Oct 28, 2019

Copy link
Copy Markdown
Member

Thanks for merging and for the great work @austindrenski! It's really nice to see this and with the super-fast build times I'm sure productivity will be improved.

PS Message sent to pg-hackers about strpos: https://www.postgresql.org/message-id/CADT4RqAz7oN4vkPir86Kg1_mQBmBxCp-L_%3D9vRpgSNPJf0KRkw%40mail.gmail.com

roji added a commit that referenced this pull request Oct 29, 2019
Which was done in #1068 to compensate for a PG12 bug.
roji added a commit that referenced this pull request Oct 29, 2019
Which was done in #1068 to compensate for a PG12 bug.
roji added a commit that referenced this pull request Oct 29, 2019
Which was done in #1068 to compensate for a PG12 bug.
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