Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
on:
push:
branches:
- '**'
pull_request:
workflow_call:
inputs:
ref:
description: Ref of this repository to build.
required: false
type: string
default: main

name: CI

jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
repository: vrchatapi/vrchatapi-dart
ref: ${{ inputs.ref || github.ref }}

- uses: dart-lang/setup-dart@v1.8.0

- uses: vrchatapi/specification/.github/actions/setup-generator@main

- uses: vrchatapi/specification/.github/actions/download@main
with:
Comment on lines +27 to +30
bundle: openapi-legacy.yaml

- run: |
mkdir -p ../vrchatapi-specification/dist
mv openapi-legacy.yaml ../vrchatapi-specification/dist/

- run: ./generate.sh local

- uses: actions/upload-artifact@v7
with:
name: dart-generated
path: .
include-hidden-files: true

analyze:
needs: generate
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v8
with:
name: dart-generated

- uses: dart-lang/setup-dart@v1.8.0

- run: dart pub get
working-directory: vrchat_dart_generated

- run: dart analyze
working-directory: vrchat_dart_generated

pana:
needs: generate
runs-on: ubuntu-latest
strategy:
matrix:
package: [vrchat_dart, vrchat_dart_generated]
defaults:
run:
working-directory: ${{ matrix.package }}
steps:
- uses: actions/download-artifact@v8
with:
name: dart-generated

- uses: dart-lang/setup-dart@v1.8.0

- run: dart pub get

- run: dart pub publish --dry-run

- run: |
dart pub global activate pana
pana --no-warning --exit-code-threshold 0
12 changes: 6 additions & 6 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
- uses: actions/checkout@v7
- uses: subosito/flutter-action@v2.23.0
with:
cache: true

- name: Pub cache
uses: actions/cache@v4
uses: actions/cache@v6
env:
cache-name: root
with:
Expand All @@ -24,7 +24,7 @@ jobs:
restore-keys: ${{ env.cache-name }}-

- name: Homebrew cache
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: |
/home/linuxbrew/.linuxbrew
Expand All @@ -37,7 +37,7 @@ jobs:
${{ runner.os }}-brew-

- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
uses: Homebrew/actions/setup-homebrew@fd832223f9f99ebf0244dd20658680e5d4aca049

- name: Generate
run: ./generate.sh
Comment on lines 39 to 43
Expand All @@ -53,7 +53,7 @@ jobs:

- name: Create Pull Request
if: steps.changelog.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v8
with:
branch: ci/regenerate-from-spec
commit-message: "Regenerated from spec"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/major-dependency-upgrades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
upgrade-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
- uses: actions/checkout@v7
- uses: subosito/flutter-action@v2.23.0
with:
cache: true

- name: Pub cache
uses: actions/cache@v4
uses: actions/cache@v6
env:
cache-name: pub-cache
with:
Expand All @@ -38,7 +38,7 @@ jobs:

- name: Create Pull Request
if: steps.pubspec_check.outputs.changed
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v8
Comment on lines 39 to +41
with:
branch: ci/major-dependency-upgrades
commit-message: "Upgraded dependency major versions"
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/pana.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test
on:
push:
branches:
- main
- '**'
pull_request:

concurrency:
Expand All @@ -13,12 +13,12 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
- uses: actions/checkout@v7
- uses: subosito/flutter-action@v2.23.0
with:
cache: true
- name: Pub cache
uses: actions/cache@v4
uses: actions/cache@v6
env:
cache-name: vrchat_dart
with:
Expand Down
2 changes: 0 additions & 2 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ dart pub get
dart run tool/patch_input.dart "$@"
cd ..

# Ensure openapi-generator is installed and up to date
brew install openapi-generator
openapi-generator generate -g dart-dio -c generator-config.yaml

# We need to do a pub get in the output before patching it
Expand Down
6 changes: 6 additions & 0 deletions openapitools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"spaces": 2,
"generator-cli": {
"version": "7.24.0"
}
}