Skip to content

Commit

Permalink
Merge branch 'main' into convert-old-and-inline-integration-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
THardy98 authored Dec 11, 2024
2 parents 7e0aac3 + 53233c9 commit d396acb
Show file tree
Hide file tree
Showing 11 changed files with 693 additions and 402 deletions.
503 changes: 114 additions & 389 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions .github/workflows/conventions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Conventions

on:
workflow_call:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
lint-and-prune:
name: Lint and Prune
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Get NPM cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- name: Restore NPM cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-linux-x64-${{ hashFiles('./package-lock.json') }}
restore-keys: |
npm-main-linux-x64-
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
version: '23.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Rust Cargo and Build cache
uses: Swatinem/rust-cache@v2
with:
workspaces: packages/core-bridge -> target
prefix-key: corebridge-buildcache
shared-key: linux-x64
env-vars: ''
save-if: false

- name: Download dependencies
run: |
npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
# eslint-import-resolver-typescript requires packages to be built
- name: Compile all non-rust code
run: npm run build -- --ignore @temporalio/core-bridge

- run: npm run lint.check
- run: npm run lint.prune
71 changes: 71 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Docs

on:
workflow_call:
inputs:
publish_target:
required: true
type: string
description: |
Whether to publish the docs. Set to either 'prod' or 'draft', or leave unset to skip publishing.
secrets:
ALGOLIA_API_KEY:
required: false
description: The Algolia API key. Required if 'publish_target' is set.
VERCEL_TOKEN:
required: false
description: The Vercel token. Required if 'publish_target' is set.

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build-docs:
name: Build Docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Get NPM cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- name: Restore NPM cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-linux-x64-${{ hashFiles('./package-lock.json') }}
restore-keys: |
npm-main-linux-x64-
- name: Download dependencies
# Make up to 3 attempts to install NPM dependencies, to work around transient NPM errors
# Don't build during install phase since we're going to explicitly build anyway
run: |
npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
- run: npm run build -- --ignore @temporalio/core-bridge

- name: Build docs
run: npm run docs
env:
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}

- name: Publish docs
if: ${{ inputs.publish_target }}
run: |
npx vercel deploy packages/docs/build \
-t '${{ secrets.VERCEL_TOKEN }}' \
--name typescript \
--scope temporal \
--yes \
${{ inputs.publish_target == 'prod' && '--prod' || '' }}
Loading

0 comments on commit d396acb

Please sign in to comment.