Skip to content

Add GH Action for CI #886

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

Merged
merged 10 commits into from
Feb 4, 2025
Merged

Add GH Action for CI #886

merged 10 commits into from
Feb 4, 2025

Conversation

0xTim
Copy link
Member

@0xTim 0xTim commented Feb 2, 2025

First steps for adopting GH actions with an action to run on PRs to make sure the site works. This runs:

  • the soundness script (which has already picked up an error)
  • jekyll build
  • The OpenAPI test client to ensure the OpenAPI spec works (cc @czechboy0)

@shahmishal can we can actions enabled? I don't know what the original CI was doing, I'm assuming just a Jekyll build

Copy link
Member

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

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

Thanks @0xTim! 🙏

steps:
- name: Check out
uses: actions/checkout@v4
- name: Run OpenAPI Tester
Copy link
Member

Choose a reason for hiding this comment

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

If we want to test that the JSON files backing the API actually still work, we'll need to start the jekyll server locally, and then tell the test CLI to fetch from that.

This might require installing Swift in the container based on the jekyll image, here in the pipeline. Or install jekyll into the Swift one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahh ok. I've updated it so that we build the container and run that - also helps us test the container image is valid.

Since the default runner has Swift installed and Docker we shouldn't need to run it in a container

Copy link
Member

@shahmishal shahmishal left a comment

Choose a reason for hiding this comment

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

Thanks

@shahmishal shahmishal marked this pull request as draft February 4, 2025 07:11
@shahmishal shahmishal marked this pull request as ready for review February 4, 2025 07:12
- name: Run OpenAPI Tester
working-directory: openapi/TestSwiftOrgClient
env:
DOWNLOADSWIFTORG_SERVER_NAME: local
Copy link
Member

Choose a reason for hiding this comment

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

And SWIFTORG_SERVER_NAME=local is the other one

Copy link
Member Author

Choose a reason for hiding this comment

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

Just beat you 😉

Copy link
Member

Choose a reason for hiding this comment

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

Nvm you were faster and already did it 🫡

@czechboy0
Copy link
Member

Not sure if the evolution API (downloads.swift.org) runs on the local jekyll server, actually.

@0xTim
Copy link
Member Author

0xTim commented Feb 4, 2025

Ah yeah good point. Will remove that check for now

@0xTim
Copy link
Member Author

0xTim commented Feb 4, 2025

@shahmishal can you remove the required mark for the old website build and switch it to the new one then merge?

@shahmishal shahmishal merged commit f963eb7 into main Feb 4, 2025
4 checks passed
@shahmishal shahmishal deleted the gh-actions-ci branch February 4, 2025 20:47
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.

3 participants