Add 'bookmark_timeline_v2' as a required property in OpenAPI specific… #155
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: build-test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Openapi Generator Setup | |
- name: Get OpenJDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: "temurin" | |
java-version: 11 | |
- name: Get Java version | |
run: java -version | |
- name: Get Openapi Generator cache file | |
id: openapi-generator-cache | |
run: echo "file=openapi-generator-cli.jar" >> $GITHUB_OUTPUT | |
- name: Openapi Generator cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.openapi-generator-cache.outputs.file }} | |
key: ${{ runner.os }}-openapi-generator-${{ hashFiles('openapi-generator-cli.jar') }} | |
restore-keys: | | |
${{ runner.os }}-openapi-generator- | |
- name: Get Openapi Generator | |
run: | | |
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0/openapi-generator-cli-7.9.0.jar -O openapi-generator-cli.jar --no-verbose | |
if: steps.openapi-generator-cache.outputs.cache-hit != 'true' | |
# Python Setup | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
architecture: "x64" | |
- name: Get Python version | |
run: python -V | |
- name: Get pip cache dir | |
id: pip-cache | |
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
- name: pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
# generate | |
- name: Build twitter-openapi | |
run: | | |
python tools/build.py | |
# clean up dependencies | |
- name: Clean up dependencies | |
run: | | |
pip uninstall -y -r requirements.txt | |
# generate | |
- name: Generate | |
run: | | |
java -jar openapi-generator-cli.jar generate -c test/python/openapi-generator-config.yaml -g python | |
java -jar openapi-generator-cli.jar generate -c test/dart-dio/openapi-generator-config.yaml -g dart-dio | |
java -jar openapi-generator-cli.jar generate -c test/typescript-fetch/openapi-generator-config.yaml -g typescript-fetch |