-
Notifications
You must be signed in to change notification settings - Fork 235
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
Add GH Action for CI #886
Changes from all commits
b6f82cd
5439124
d9e7cea
4968068
ef3ec8c
e4a6672
73680a4
ed9c94b
512d53d
4aeee4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: test | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
pull_request: { types: [opened, reopened, synchronize, ready_for_review] } | ||
push: { branches: [ main ] } | ||
|
||
jobs: | ||
soundness: | ||
name: Soundness Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Run script | ||
run: ./scripts/soundness.sh | ||
|
||
build-site: | ||
name: Build the Jekyll Site | ||
runs-on: ubuntu-latest | ||
container: ruby:3.3 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Build site | ||
run: bundle install && bundle exec jekyll build | ||
|
||
test-openapi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
- name: Run OpenAPI Tester | ||
working-directory: openapi/TestSwiftOrgClient | ||
env: | ||
DOWNLOADSWIFTORG_SERVER_NAME: local | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And SWIFTORG_SERVER_NAME=local is the other one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just beat you 😉 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nvm you were faster and already did it 🫡 |
||
SWIFTORG_SERVER_NAME: local | ||
run: | | ||
docker compose -f ../../docker-compose.yaml run build | ||
docker compose -f ../../docker-compose.yaml run -d -p 4000:4000 website | ||
swift run swiftorgClient |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,6 @@ | |
# docker-compose up website | ||
# | ||
|
||
version: "2" | ||
|
||
services: | ||
|
||
docker-setup: | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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