feat: expose various emit functions to subclasses #937
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: Test PR | |
on: | |
pull_request: | |
branches: | |
- master | |
- 'release/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/setup | |
test: | |
needs: [build] | |
runs-on: ${{ matrix.runs-on }} | |
strategy: | |
fail-fast: true | |
matrix: | |
fixture: | |
- typescript,typescript-zod,typescript-effect-schema | |
- javascript,schema-javascript | |
- golang,schema-golang | |
- cjson,schema-cjson | |
- cplusplus,schema-cplusplus | |
- flow,schema-flow | |
- java,schema-java | |
- python,schema-python | |
- haskell,schema-haskell | |
- csharp,schema-csharp,schema-json-csharp,graphql-csharp,csharp-SystemTextJson | |
- json-ts-csharp | |
- dart,schema-dart | |
- swift,schema-swift | |
- javascript-prop-types | |
- ruby | |
- php | |
- scala3,schema-scala3 | |
- elixir,schema-elixir,graphql-elixir | |
# Partially working | |
# - schema-typescript # TODO Unify with typescript once fixed | |
# Implementation is too outdated to test in GitHub Actions | |
# - elm,schema-elm | |
# Language is too niche / obscure to test easily on ubuntu-latest | |
# - pike,schema-pike | |
# Not yet started | |
# @schani can you help me understand this fixture? | |
# It looks like it tests 13+ languages? | |
# - graphql | |
# Never tested? | |
# - crystal | |
runs-on: [ubuntu-latest] | |
include: | |
# Rust is very slow, so we use a larger runner | |
- fixture: rust,schema-rust | |
runs-on: ubuntu-latest-8-cores | |
# Kotlin is also slow | |
- fixture: kotlin,schema-kotlin,kotlin-jackson,schema-kotlin-jackson | |
runs-on: ubuntu-latest-8-cores | |
- fixture: objective-c | |
runs-on: macos-11 | |
name: ${{ matrix.fixture }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/setup | |
- name: Setup PHP | |
if: ${{ contains(matrix.fixture, 'php') }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.2" | |
- name: Setup Dart | |
if: ${{ contains(matrix.fixture, 'dart') }} | |
uses: dart-lang/[email protected] | |
with: | |
sdk: 2.14.4 | |
- name: Setup Swift | |
if: ${{ contains(matrix.fixture, 'swift') }} | |
uses: swift-actions/setup-swift@v1 | |
with: | |
swift-version: "5.7.2" | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
if: ${{ contains(matrix.fixture, 'ruby') }} | |
with: | |
ruby-version: "3.2.0" | |
- name: Setup .NET Core SDK | |
if: ${{ contains(matrix.fixture, 'csharp') }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6 | |
- name: Install Rust | |
if: ${{ contains(matrix.fixture, 'rust') }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Install Elm | |
if: ${{ contains(matrix.fixture, 'elm') }} | |
run: | | |
curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz | |
gunzip elm.gz | |
chmod +x elm | |
sudo mv elm /usr/local/bin/ | |
- name: Install Haskell | |
if: ${{ contains(matrix.fixture, 'haskell') }} | |
run: | | |
if ! command -v stack > /dev/null 2>&1; then | |
curl -sL "https://get.haskellstack.org/" | sh | |
fi | |
- name: Install Python 3.7 | |
if: ${{ contains(matrix.fixture, 'python') }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: Install Python Dependencies | |
if: ${{ contains(matrix.fixture, 'python') }} | |
run: | | |
pip3.7 install mypy python-dateutil types-python-dateutil | |
- name: Install flow | |
if: ${{ contains(matrix.fixture, 'flow') }} | |
run: | | |
npm install -g [email protected] [email protected] | |
- name: Install Java | |
if: ${{ matrix.fixture == 'java,schema-java' || contains(matrix.fixture, 'kotlin') }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "11" | |
distribution: "adopt" | |
- name: Install Maven | |
if: ${{ matrix.fixture == 'java,schema-java' }} | |
uses: stCarolas/[email protected] | |
with: | |
maven-version: 3.8.2 | |
- name: Install Kotlin | |
if: ${{ contains(matrix.fixture, 'kotlin') }} | |
uses: fwilhe2/setup-kotlin@main | |
- name: Install go | |
if: ${{ contains(matrix.fixture, 'golang') }} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.15 | |
- name: Install C | |
if: ${{ contains(matrix.fixture, 'cjson') }} | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install build-essential valgrind | |
- name: Install C++ | |
if: ${{ contains(matrix.fixture, 'cplusplus') }} | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install libboost-all-dev software-properties-common g++ --assume-yes | |
- name: Install scala | |
if: ${{ contains(matrix.fixture, 'scala3') }} | |
uses: VirtusLab/scala-cli-setup@main | |
- run: echo '@main def hello() = println("We need this spam print statement for bloop to exit correctly...")' | scala-cli _ | |
if: ${{ contains(matrix.fixture, 'scala3') }} | |
- name: Install Elixir | |
if: ${{ contains(matrix.fixture, 'elixir') }} | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: "1.15.7" | |
otp-version: "26.0" | |
- run: QUICKTEST=true FIXTURE=${{ matrix.fixture }} npm test | |
test-complete: | |
if: ${{ cancelled() || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'failure') }} | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
echo "Some workflows have failed!" | |
exit 1 |