Skip to content

update schema and input #43

update schema and input

update schema and input #43

Workflow file for this run

name: Integration
on:
- pull_request
- push
jobs:
csharp:
name: CSharp
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration/csharp
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core SDK 6.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Generate
env:
FORMAT: csharp
CONFIG: "namespace=Generator"
run: cd ../../ && docker compose up
- name: Move
run: mv ../../output/*.cs .
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Run
run: bin/Release/net6.0/generator
go:
name: Go
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration/go
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Generate
env:
FORMAT: go
CONFIG: "namespace=main"
run: cd ../../ && docker compose up
- name: Move
run: mv ../../output/*.go .
- name: Build
run: go build -v
- name: Run
run: ./main
java:
name: Java
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration/java
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Generate
env:
FORMAT: java
CONFIG: "namespace=org.typeschema.generator"
run: cd ../../ && docker compose up
- name: Move
run: mv ../../output/*.java .
- name: Build with Maven
run: mvn --batch-mode --update-snapshots package
- name: Run
run: java -jar target/generator-0.1.0-jar-with-dependencies.jar
php:
name: PHP
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration/php
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
coverage: none
- name: Generate
env:
FORMAT: php
CONFIG: "namespace=Generator"
run: cd ../../ && docker compose up
- name: Move
run: mv ../../output/*.php .
- name: Composer install
run: composer install --no-interaction --no-ansi --no-progress
- name: Run
run: php main.php
python:
name: Python
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration/python
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Generate
env:
FORMAT: python
CONFIG:
run: cd ../../ && docker compose up
- name: Move
run: mv ../../output/*.py .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 .
# default set of ruff rules with GitHub Annotations
ruff --format=github --target-version=py37 .
- name: Run
run: python main.py
rust:
name: Rust
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration/rust
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update
- run: sudo curl https://sh.rustup.rs -sSf > ./rustup.sh && chmod +x ./rustup.sh && ./rustup.sh -y
- run: rustc --version
- name: Generate
env:
FORMAT: rust
CONFIG:
run: cd ../../ && docker compose up
- name: Move
run: mv ../../output/*.rs .
- run: cargo run
typescript:
name: TypeScript
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration/typescript
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Generate
env:
FORMAT: typescript
CONFIG:
run: cd ../../ && docker compose up
- name: Move
run: mv ../../output/*.ts .
- run: npm i
- run: npm run build
- run: node main.js
visualbasic:
name: VisualBasic
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration/visualbasic
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core SDK 6.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Generate
env:
FORMAT: visualbasic
CONFIG:
run: cd ../../ && docker compose up
- name: Move
run: mv ../../output/*.vb .
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Run
run: bin/Release/net6.0/Generator