This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
Bump bufbuild/buf-setup-action from 1.23.1 to 1.25.0 #133
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: SDK | |
"on": | |
pull_request: | |
paths: | |
- ".github/workflows/test-sdk.yml" | |
- "api/**" | |
- "examples/**" | |
- "sdk/**" | |
- "utilities/test-server/**" | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_PROFILE_TEST_DEBUG: 0 | |
jobs: | |
node-sdk: | |
name: Build Node SDK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Print version of protoc | |
run: protoc --version | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
cache-dependency-path: sdk/node/package-lock.json | |
- name: Install Buf dependencies | |
run: npm install -g grpc_tools_node_protoc_ts grpc-tools | |
- name: Set up Buf | |
uses: bufbuild/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run Buf | |
working-directory: api | |
run: buf generate | |
- name: Install dependencies | |
working-directory: ./sdk/node | |
run: npm install | |
- name: Build Node client | |
working-directory: ./sdk/node | |
run: npm run build | |
- name: Upload Node SDK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: node-sdk | |
path: sdk/node/** | |
test-server: | |
name: Build test server | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Print version of protoc | |
run: protoc --version | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cache build artifacts | |
uses: swatinem/[email protected] | |
- name: Compile test-server | |
run: cargo build -p test-server | |
- name: Upload test-server | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-server | |
path: target/debug/test-server | |
dotnet: | |
name: Test .NET bot | |
runs-on: ubuntu-latest | |
needs: | |
- test-server | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup dotnet | |
uses: actions/[email protected] | |
with: | |
dotnet-version: "6.0.x" | |
- name: Install dependencies | |
working-directory: ./examples/dotnet | |
run: dotnet restore | |
- name: Download test-server | |
uses: actions/download-artifact@v3 | |
with: | |
name: test-server | |
path: bin | |
- name: Set permissions for test-server | |
run: chmod +x bin/test-server | |
- name: Start test-server | |
run: bin/test-server & | |
- name: Run .NET example | |
working-directory: ./examples/dotnet | |
run: dotnet run | |
java: | |
name: Test Java bot | |
runs-on: ubuntu-latest | |
needs: | |
- test-server | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 11 | |
- name: Build SDK | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 7.5 | |
arguments: clean build publishToMavenLocal | |
build-root-directory: sdk/java | |
- name: Build example | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 7.5 | |
arguments: clean build | |
build-root-directory: examples/java | |
- name: Download test-server | |
uses: actions/download-artifact@v3 | |
with: | |
name: test-server | |
path: bin | |
- name: Set permissions for test-server | |
run: chmod +x bin/test-server | |
- name: Start test-server | |
run: bin/test-server & | |
- name: Run example | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 7.5 | |
arguments: run | |
build-root-directory: examples/java | |
javascript: | |
name: Test JavaScript bot | |
runs-on: ubuntu-latest | |
needs: | |
- node-sdk | |
- test-server | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
cache-dependency-path: examples/javascript/package-lock.json | |
- name: Download Node SDK | |
uses: actions/download-artifact@v3 | |
with: | |
name: node-sdk | |
path: sdk/node | |
- name: Install dependencies | |
working-directory: ./examples/javascript | |
run: npm install | |
- name: Download test-server | |
uses: actions/download-artifact@v3 | |
with: | |
name: test-server | |
path: bin | |
- name: Set permissions for test-server | |
run: chmod +x bin/test-server | |
- name: Start test-server | |
run: bin/test-server & | |
- name: Run JavaScript example | |
working-directory: ./examples/javascript | |
run: npm start | |
python-sdk: | |
name: Test Python SDK | |
runs-on: ubuntu-latest | |
needs: | |
- test-server | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Install Python SDK | |
run: python -m pip install sdk/python/. | |
- name: Download test-server | |
uses: actions/download-artifact@v3 | |
with: | |
name: test-server | |
path: bin | |
- name: Set permissions for test-server | |
run: chmod +x ./bin/test-server | |
- name: Start test-server | |
run: ./bin/test-server & | |
- name: Run Python SDK test | |
run: python sdk/python/test.py | |
ruby: | |
name: Test Ruby bot | |
runs-on: ubuntu-latest | |
needs: test-server | |
env: | |
BUF_TOKEN: ${{ secrets.BUF_TOKEN }} | |
steps: | |
- name: Set up Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Print version of protoc | |
run: protoc --version | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Buf | |
uses: bufbuild/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install Buf dependencies | |
run: npm install -g grpc_tools_node_protoc_ts grpc-tools | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
bundler-cache: true | |
- name: Generate Ruby bindings | |
working-directory: ./api | |
run: buf generate | |
- name: Install SDK dependencies | |
working-directory: ./sdk/ruby | |
run: bundle install | |
- name: Build gem | |
working-directory: ./sdk/ruby | |
run: bundle exec rake build | |
- name: Download test-server | |
uses: actions/download-artifact@v3 | |
with: | |
name: test-server | |
path: bin | |
- name: Set permissions for test-server | |
run: chmod +x bin/test-server | |
- name: Start test-server | |
run: bin/test-server & | |
- name: Install example dependencies | |
working-directory: ./examples/ruby | |
run: bundle install | |
- name: Run Ruby example | |
working-directory: ./examples/ruby | |
run: bundle exec rake run | |
rust: | |
name: Test Rust bot | |
runs-on: ubuntu-latest | |
needs: test-server | |
steps: | |
- name: Set up Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Print version of protoc | |
run: protoc --version | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cache build artifacts | |
uses: swatinem/[email protected] | |
- name: Compile Rust example | |
run: cargo build -p auto-traffic-control-example | |
- name: Download test-server | |
uses: actions/download-artifact@v3 | |
with: | |
name: test-server | |
path: bin | |
- name: Set permissions for test-server | |
run: chmod +x bin/test-server | |
- name: Start test-server | |
run: bin/test-server & | |
- name: Run Rust example | |
run: cargo run -p auto-traffic-control-example | |
typescript: | |
name: Test TypeScript bot | |
runs-on: ubuntu-latest | |
needs: | |
- node-sdk | |
- test-server | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
cache-dependency-path: examples/typescript/package-lock.json | |
- name: Download Node SDK | |
uses: actions/download-artifact@v3 | |
with: | |
name: node-sdk | |
path: sdk/node | |
- name: Install dependencies | |
working-directory: ./examples/typescript | |
run: npm install | |
- name: Download test-server | |
uses: actions/download-artifact@v3 | |
with: | |
name: test-server | |
path: bin | |
- name: Set permissions for test-server | |
run: chmod +x bin/test-server | |
- name: Start test-server | |
run: bin/test-server & | |
- name: Run TypeScript example | |
working-directory: ./examples/typescript | |
run: npm start |