Properly ignore unknown fields when parsing history JSON #337
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- "releases/*" | |
jobs: | |
build-lint-test: | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-arm] | |
include: | |
- os: windows-latest | |
checkTarget: true | |
- os: ubuntu-latest | |
docsTarget: true | |
cloudTestTarget: true | |
- os: ubuntu-arm | |
runsOn: buildjet-4vcpu-ubuntu-2204-arm | |
runs-on: ${{ matrix.runsOn || matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: src/Temporalio/Bridge | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
- name: Install protoc (x64) | |
# Does not work on arm | |
if: ${{ matrix.os != 'ubuntu-arm' }} | |
uses: arduino/setup-protoc@v1 | |
with: | |
# TODO(cretz): Upgrade when https://github.com/arduino/setup-protoc/issues/33 fixed | |
version: '3.x' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install protoc (Linux ARM) | |
if: ${{ matrix.os == 'ubuntu-arm' }} | |
run: | | |
sudo apt update -y | |
sudo apt install -y protobuf-compiler | |
- name: Build | |
# We intentionally just build debug mode in this CI. We build before | |
# regen to confirm no interop header changes. | |
run: dotnet build | |
- name: Regen confirm unchanged | |
if: ${{ matrix.checkTarget }} | |
# Needs to be 16.0.0 until https://github.com/dotnet/ClangSharp/pull/506 released | |
run: | | |
dotnet tool install --global --version 16.0.0 ClangSharpPInvokeGenerator | |
ClangSharpPInvokeGenerator @src/Temporalio/Bridge/GenerateInterop.rsp | |
dotnet run --project src/Temporalio.Api.Generator | |
npx doctoc README.md | |
git config --global core.safecrlf false | |
git diff --exit-code | |
- name: Check format | |
if: ${{ matrix.checkTarget }} | |
run: dotnet format --verify-no-changes | |
- name: Test | |
run: dotnet test --logger "console;verbosity=detailed" --blame-crash -v n | |
- name: Upload test failure | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: test-fail-${{ matrix.os }} | |
path: tests/Temporalio.Tests/TestResults | |
- name: Confirm bench works | |
run: dotnet run --project tests/Temporalio.SimpleBench/Temporalio.SimpleBench.csproj -- --workflow-count 5 --max-cached-workflows 100 --max-concurrent 100 | |
- name: Test cloud | |
# Only supported in non-fork runs, since secrets are not available in forks | |
if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-dotnet') }} | |
env: | |
TEMPORAL_CLIENT_TARGET_HOST: ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}.tmprl.cloud:7233 | |
TEMPORAL_CLIENT_NAMESPACE: ${{ vars.TEMPORAL_CLIENT_NAMESPACE }} | |
TEMPORAL_CLIENT_CERT: ${{ secrets.TEMPORAL_CLIENT_CERT }} | |
TEMPORAL_CLIENT_KEY: ${{ secrets.TEMPORAL_CLIENT_KEY }} | |
run: dotnet run --project tests/Temporalio.Tests -- -verbose -method "*.ExecuteWorkflowAsync_Simple_Succeeds" | |
- name: Build docs | |
if: ${{ matrix.docsTarget }} | |
run: | | |
dotnet tool update -g docfx | |
docfx src/Temporalio.ApiDoc/docfx.json --warningsAsErrors | |
- name: Deploy docs | |
# Only deploy on main merge, not in PRs | |
if: ${{ github.ref == 'refs/heads/main' && matrix.docsTarget }} | |
env: | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
run: npx vercel deploy src/Temporalio.ApiDoc/_site --token ${{ secrets.VERCEL_TOKEN }} --prod --yes |