Skip to content
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 docs and go bindings checks to CI workflow #64

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
65 changes: 64 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: CI

on:
pull_request:
push:

jobs:
lint:
Expand Down Expand Up @@ -41,6 +40,70 @@ jobs:
- name: Run Tests
run: yarn test

docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Generate docs
run: yarn docgen

- name: Check if docs are up to date
run: |
# Check if docgen generated docs that are uncommitted
if [ -n "$(git status --porcelain)" ]; then
echo "::warning file=.github/workflows/ci.yaml,line=60,col=20,endColumn=31::❌ Generated docs are not up to date. Please run yarn docgen and commit the changes."
git status --porcelain
git diff --color
exit 1
else
echo "✅ Generated docs are up to date."
fi

go-bindings:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Setup Go version
uses: actions/setup-go@v4
with:
go-version: "1.23.6"

- name: Generate go-bindings
run: |
# Generate go-bindings
bash scripts/generate_go_abi.sh

- name: Check if go-bindings are up to date
run: |
# Check if go-bindings are up to date
if [ -n "$(git status --porcelain)" ]; then
echo "::warning file=.github/workflows/ci.yaml,line=89,col=19,endColumn=50::❌ Generated go-bindings are not up to date. Please run scripts/generate_go_abi.sh and commit the changes."
git status --porcelain
git diff --color
exit 1
else
echo "✅ Generated go-bindings are up to date."
fi

coverage:
runs-on: ubuntu-latest

Expand Down
Loading
Loading