swift-openapi-generator icon indicating copy to clipboard operation
swift-openapi-generator copied to clipboard

[GHA] Update to the latest workflows

Open FranzBusch opened this issue 1 year ago • 7 comments

Motivation

I made more progress on the reusable workflows in NIO so it's even easier to adopt them.

Modification

This PR fixes up the renamed workflow references and adds unit tests and cxx-interop checks.

Result

Green GH actions CI

FranzBusch avatar Jul 24 '24 10:07 FranzBusch

@simonjbeaumont @czechboy0 Would appreciate some eyes on the failing format check

FranzBusch avatar Jul 24 '24 10:07 FranzBusch

@simonjbeaumont @czechboy0 Would appreciate some eyes on the failing format check

I suspect you want to add Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources to the ignore list for swift-format.

czechboy0 avatar Jul 24 '24 10:07 czechboy0

See here: https://github.com/apple/swift-openapi-generator/blob/99859083e53912612b56b4b8713a971c20dab3ef/scripts/run-swift-format.sh#L34

czechboy0 avatar Jul 24 '24 10:07 czechboy0

@FranzBusch It's still failing, seems the Generated entry isn't working, it's meant to match the word Generated anywhere in the path. The affected paths here are e.g. Examples/manual-generation-generator-cli-example/Sources/ManualGeneratorInvocationClient/Generated/Client.swift

czechboy0 avatar Jul 24 '24 14:07 czechboy0

Ok, soundness is failing now:

** Running /code/scripts/check-license-headers.sh...
** ERROR: Unsupported file extension for file (exclude or update this script): .swiftformatignore

I think it just requires you to add .swiftformatignore to the ignore list in scripts/check-license-headers.sh

czechboy0 avatar Jul 24 '24 14:07 czechboy0

@czechboy0 @simonjbeaumont This passes the format check now. Please take a look at the changes. I also added the integration tests and example tests here. Once we have this merged the only thing that is missing is

  • Turning on the license check and turning off the old CI
  • Adding the compatibility test

FranzBusch avatar Jul 24 '24 14:07 FranzBusch

Just realised I have to change something in the reusable workflow to get the integration tests to pass

FranzBusch avatar Jul 24 '24 14:07 FranzBusch

@FranzBusch noticed this got reopened. Should I assume it's still a WIP for now and wait for a ping from you to review?

simonjbeaumont avatar Aug 20 '24 08:08 simonjbeaumont

@simonjbeaumont @czechboy0 This PR is ready to review. The CI is all passing. I only had to skip the unacceptable language mode check and the shell check steps. I leave this up to you to re-enable them. The language mode depends on the old soundness CI to remove the text file with the words and the shell check depends on fixing up a few scripts. I would also encourage you to look into the examples CI and if you can reduce build times by using the same build dirs. You are currently rebuilding the same dependencies multiple times.

FranzBusch avatar Aug 20 '24 09:08 FranzBusch

The compatibility test is also missing but similarly to the above could you please set that up in a follow up. It would be a good exercise to see if the reusable workflows give you want you need.

FranzBusch avatar Aug 20 '24 09:08 FranzBusch

Looks broadly good to me, but I'll let @simonjbeaumont review more closely and sign off.

czechboy0 avatar Aug 20 '24 09:08 czechboy0

@simonjbeaumont Gentle ping. I think we can merge this. It should replicate everything that Jenkins is currently providing.

FranzBusch avatar Sep 09 '24 09:09 FranzBusch

I'll take this, this week. Sorry for letting it linger.

simonjbeaumont avatar Sep 09 '24 10:09 simonjbeaumont

@FranzBusch I'm happy with this now and so is Honza. Can you do a final pass with your Github Actions hat on and then hit merge? :)

simonjbeaumont avatar Sep 18 '24 16:09 simonjbeaumont

I can't approve since I am the author but LGTM!

FranzBusch avatar Sep 18 '24 20:09 FranzBusch