Skip to content

Commit

Permalink
Merge pull request #98 from celo-org/ci/docs-generation
Browse files Browse the repository at this point in the history
Ci/docs generation
  • Loading branch information
nicolasbrugneaux authored Jan 29, 2024
2 parents f8fe7bf + ea7ae7c commit e6d4ad0
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 82 deletions.
49 changes: 37 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: "enable corepack for yarn"
run : sudo corepack enable yarn
- name: 'enable corepack for yarn'
run: sudo corepack enable yarn
- uses: actions/checkout@v4
# must call twice because of chicken and egg problem with yarn and node
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -222,16 +222,6 @@ jobs:
uses: ./.github/actions/sync-workspace
with:
artifacts_to_cache: ${{ needs.install-dependencies.outputs.artifacts_to_cache }}
- name: Fail if someone forgot to commit CLI docs
run: |
yarn workspace @celo/celocli docs
if [[ $(git status packages/docs/command-line-interface --porcelain) ]]; then
git --no-pager diff packages/docs/command-line-interface
echo "There are git differences after generating CLI docs"
git status
git diff
exit 1
fi
- name: Run tests
run: |
yarn workspace @celo/celocli test
Expand All @@ -242,6 +232,41 @@ jobs:
run: |
yarn workspace @celo/celocli run celocli releasecelo --help
docs-tests:
name: Docs tests
runs-on: ['self-hosted', 'org', '8-cpu']
timeout-minutes: 30
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/cli') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
steps:
- uses: actions/checkout@v4
- name: Sync workspace
uses: ./.github/actions/sync-workspace
with:
artifacts_to_cache: ${{ needs.install-dependencies.outputs.artifacts_to_cache }}
- run: sudo corepack enable yarn
- name: Sync workspace
uses: ./.github/actions/sync-workspace
with:
artifacts_to_cache: ${{ needs.install-dependencies.outputs.artifacts_to_cache }}
- name: Fail if someone forgot to commit docs
run: |
yarn docs
if [[ $(git status packages/docs --porcelain) ]]; then
git --no-pager diff packages/docs
echo "There are git differences after generating all docs"
git status
git diff
exit 1
fi
base-test:
name: SDK Base package Tests
runs-on: ['self-hosted', 'org', '8-cpu']
Expand Down
40 changes: 20 additions & 20 deletions packages/docs/sdk/docs/connect/interfaces/index.Block.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BlockTransactionBase.baseFeePerGas

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:433
node_modules/web3-eth/types/index.d.ts:433

___

Expand All @@ -61,7 +61,7 @@ BlockTransactionBase.difficulty

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:443
node_modules/web3-eth/types/index.d.ts:443

___

Expand All @@ -75,7 +75,7 @@ BlockTransactionBase.extraData

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:429
node_modules/web3-eth/types/index.d.ts:429

___

Expand All @@ -89,7 +89,7 @@ BlockTransactionBase.gasLimit

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:430
node_modules/web3-eth/types/index.d.ts:430

___

Expand All @@ -103,7 +103,7 @@ BlockTransactionBase.gasUsed

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:431
node_modules/web3-eth/types/index.d.ts:431

___

Expand All @@ -117,7 +117,7 @@ BlockTransactionBase.hash

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:420
node_modules/web3-eth/types/index.d.ts:420

___

Expand All @@ -131,7 +131,7 @@ BlockTransactionBase.logsBloom

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:424
node_modules/web3-eth/types/index.d.ts:424

___

Expand All @@ -145,7 +145,7 @@ BlockTransactionBase.miner

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:428
node_modules/web3-eth/types/index.d.ts:428

___

Expand All @@ -159,7 +159,7 @@ BlockTransactionBase.nonce

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:422
node_modules/web3-eth/types/index.d.ts:422

___

Expand All @@ -173,7 +173,7 @@ BlockTransactionBase.number

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:419
node_modules/web3-eth/types/index.d.ts:419

___

Expand All @@ -187,7 +187,7 @@ BlockTransactionBase.parentHash

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:421
node_modules/web3-eth/types/index.d.ts:421

___

Expand All @@ -201,7 +201,7 @@ BlockTransactionBase.receiptsRoot

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:427
node_modules/web3-eth/types/index.d.ts:427

___

Expand All @@ -215,7 +215,7 @@ BlockTransactionBase.sha3Uncles

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:423
node_modules/web3-eth/types/index.d.ts:423

___

Expand All @@ -229,7 +229,7 @@ BlockTransactionBase.size

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:442
node_modules/web3-eth/types/index.d.ts:442

___

Expand All @@ -243,7 +243,7 @@ BlockTransactionBase.stateRoot

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:426
node_modules/web3-eth/types/index.d.ts:426

___

Expand All @@ -257,7 +257,7 @@ BlockTransactionBase.timestamp

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:432
node_modules/web3-eth/types/index.d.ts:432

___

Expand All @@ -271,7 +271,7 @@ BlockTransactionBase.totalDifficulty

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:444
node_modules/web3-eth/types/index.d.ts:444

___

Expand All @@ -281,7 +281,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:438
node_modules/web3-eth/types/index.d.ts:438

___

Expand All @@ -295,7 +295,7 @@ BlockTransactionBase.transactionsRoot

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:425
node_modules/web3-eth/types/index.d.ts:425

___

Expand All @@ -309,4 +309,4 @@ BlockTransactionBase.uncles

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:445
node_modules/web3-eth/types/index.d.ts:445
30 changes: 15 additions & 15 deletions packages/docs/sdk/docs/connect/interfaces/index.BlockHeader.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:433
node_modules/web3-eth/types/index.d.ts:433

___

Expand All @@ -42,7 +42,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:429
node_modules/web3-eth/types/index.d.ts:429

___

Expand All @@ -52,7 +52,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:430
node_modules/web3-eth/types/index.d.ts:430

___

Expand All @@ -62,7 +62,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:431
node_modules/web3-eth/types/index.d.ts:431

___

Expand All @@ -72,7 +72,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:420
node_modules/web3-eth/types/index.d.ts:420

___

Expand All @@ -82,7 +82,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:424
node_modules/web3-eth/types/index.d.ts:424

___

Expand All @@ -92,7 +92,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:428
node_modules/web3-eth/types/index.d.ts:428

___

Expand All @@ -102,7 +102,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:422
node_modules/web3-eth/types/index.d.ts:422

___

Expand All @@ -112,7 +112,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:419
node_modules/web3-eth/types/index.d.ts:419

___

Expand All @@ -122,7 +122,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:421
node_modules/web3-eth/types/index.d.ts:421

___

Expand All @@ -132,7 +132,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:427
node_modules/web3-eth/types/index.d.ts:427

___

Expand All @@ -142,7 +142,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:423
node_modules/web3-eth/types/index.d.ts:423

___

Expand All @@ -152,7 +152,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:426
node_modules/web3-eth/types/index.d.ts:426

___

Expand All @@ -162,7 +162,7 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:432
node_modules/web3-eth/types/index.d.ts:432

___

Expand All @@ -172,4 +172,4 @@ ___

#### Defined in

packages/sdk/connect/node_modules/web3-eth/types/index.d.ts:425
node_modules/web3-eth/types/index.d.ts:425
Loading

0 comments on commit e6d4ad0

Please sign in to comment.