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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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
container: swift:6.0
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

working-directory: openapi/TestSwiftOrgClient
run: swift run