mirror of https://github.com/dapr/quickstarts.git
Merge pull request #805 from ASHIQUEMD/master
Reduce parallelism and split validation per language
This commit is contained in:
commit
de038bca68
|
@ -122,6 +122,11 @@ jobs:
|
|||
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||
SAMPLE_REGISTRY: ${{ vars.SAMPLE_REGISTRY }}
|
||||
steps:
|
||||
- name: Set REPO_OWNER
|
||||
run: |
|
||||
REPO_OWNER=${{ github.repository_owner }}
|
||||
# Lowercase the value
|
||||
echo "REPO_OWNER=${REPO_OWNER,,}" >>${GITHUB_ENV}
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
- name: Parse release version and set REL_VERSION
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright 2021 The Dapr Authors
|
||||
# Copyright 2023 The Dapr Authors
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
@ -11,7 +11,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Validate Secrets Management
|
||||
name: Validate csharp quickstart
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
@ -29,19 +29,19 @@ on:
|
|||
- release-*
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate quickstart for `${{ matrix.quickstart_language }}` with `${{ matrix.quickstart_variant }}` on ${{ matrix.os }}
|
||||
name: Validate C# quickstart on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15
|
||||
timeout-minutes: 130
|
||||
env:
|
||||
GOVER: 1.17
|
||||
KUBERNETES_VERSION: v1.21.1
|
||||
KIND_VERSION: v0.11.0
|
||||
KIND_IMAGE_SHA: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
|
||||
DAPR_DEFAULT_IMAGE_REGISTRY: GHCR
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install
|
||||
GOVER: 1.18
|
||||
KUBERNETES_VERSION: v1.25.3
|
||||
KIND_VERSION: v0.17.0
|
||||
KIND_IMAGE_SHA: sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
|
||||
strategy:
|
||||
matrix:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
quickstart_language: [go, csharp, javascript, python, java]
|
||||
quickstart_variant: [http, sdk]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Check out code
|
||||
|
@ -51,16 +51,8 @@ jobs:
|
|||
with:
|
||||
envFile: './.github/env/global.env'
|
||||
expand: 'true'
|
||||
- name: Pinning Python to ${{ env.MACOS_PYTHON_VERSION }} on MacOS
|
||||
if: matrix.os == 'macos-latest' && matrix.quickstart_language == 'python'
|
||||
run: brew install python@${{ env.MACOS_PYTHON_VERSION }} && brew unlink python@${{ env.MACOS_PYTHON_VERSION }} && brew link --overwrite python@${{ env.MACOS_PYTHON_VERSION }}
|
||||
- name: Verify Python version
|
||||
if: matrix.quickstart_language == 'python'
|
||||
run: python3 --version
|
||||
- name: Upgrade pip and setuptools
|
||||
if: matrix.os == 'macos-latest' && matrix.quickstart_language == 'python'
|
||||
run: pip3 install --upgrade pip && python3 -m pip install --upgrade setuptools
|
||||
- name: Install podman - MacOS
|
||||
timeout-minutes: 15
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo rm -rf `brew --cache`
|
||||
|
@ -73,41 +65,54 @@ jobs:
|
|||
podman machine start || echo "VM might not have started"
|
||||
sleep 10
|
||||
podman machine inspect
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Set up OpenJDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Install podman-compose
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo pip3 install podman-compose
|
||||
- name: Create symbolic link between Podman and Docker
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo ln -s $(which podman) /usr/local/bin/docker
|
||||
sudo ln -s $(which podman-compose) /usr/local/bin/docker-compose
|
||||
- name: Install .NET Core
|
||||
uses: actions/setup-dotnet@v1.9.0
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
7.0.x
|
||||
- name: Set up Dapr CLI - Mac/Linux
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: wget -q ${{ env.DAPR_INSTALL_URL }}/install.sh -O - | /bin/bash -s ${{ env.DAPR_CLI_VERSION }}
|
||||
- name: Set up Dapr CLI - Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: powershell -Command "\$$script=iwr -useb ${{ env.DAPR_INSTALL_URL }}/install.ps1; \$$block=[ScriptBlock]::Create(\$$script); invoke-command -ScriptBlock \$$block -ArgumentList ${{ env.DAPR_CLI_VERSION }}"
|
||||
run: powershell -Command "\$$script=iwr -useb ${{ env.DAPR_INSTALL_URL }}/install.ps1; \$$block=[ScriptBlock]::Create(\$$script); invoke-command -ScriptBlock \$$block -ArgumentList ${{ env.DAPR_CLI_VERSION }}"
|
||||
- name: Install Dapr
|
||||
run: |
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }} --container-runtime=podman
|
||||
dapr --version
|
||||
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }}
|
||||
dapr --version
|
||||
- name: Install utilities dependencies
|
||||
run: |
|
||||
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
|
||||
pip3 install setuptools wheel
|
||||
pip3 install mechanical-markdown
|
||||
- name: Validate ${{ matrix.quickstart_language }} ${{ matrix.quickstart_variant }} secrets management
|
||||
- name: Validate building blocks with C#
|
||||
run: |
|
||||
pushd secrets_management/${{ matrix.quickstart_language }}/${{ matrix.quickstart_variant }}
|
||||
make validate
|
||||
popd
|
||||
variants=("http" "sdk")
|
||||
building_blocks=$(find . -maxdepth 1 -mindepth 1 -type d)
|
||||
for building_block in $building_blocks; do
|
||||
for variant in "${variants[@]}"
|
||||
do
|
||||
if [ ! -d "$building_block/csharp/$variant" ];
|
||||
then
|
||||
echo "$building_block/csharp/$variant does not exist."
|
||||
else
|
||||
pushd $building_block/csharp/$variant
|
||||
echo "Validating $building_block/csharp/$variant quickstart"
|
||||
make validate
|
||||
popd
|
||||
fi
|
||||
done
|
||||
done
|
||||
- name: Linkcheck README.md
|
||||
run: |
|
||||
make validate
|
||||
make validate
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright 2022 The Dapr Authors
|
||||
# Copyright 2023 The Dapr Authors
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
@ -11,7 +11,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Validate State Management
|
||||
name: Validate go quickstart
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
@ -28,20 +28,20 @@ on:
|
|||
- feature/new_quickstarts
|
||||
- release-*
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate quickstart for `${{ matrix.quickstart_language }}` with `${{ matrix.quickstart_variant }}` on ${{ matrix.os }}
|
||||
deploy:
|
||||
name: Validate Go quickstarts on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15
|
||||
timeout-minutes: 130
|
||||
env:
|
||||
GOVER: 1.17
|
||||
DAPR_DEFAULT_IMAGE_REGISTRY: GHCR
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install
|
||||
GOVER: 1.18
|
||||
KUBERNETES_VERSION: v1.21.1
|
||||
KIND_VERSION: v0.11.0
|
||||
KIND_IMAGE_SHA: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
quickstart_language: [go, csharp, javascript, python, java]
|
||||
quickstart_variant: [http, sdk]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Check out code
|
||||
|
@ -51,16 +51,8 @@ jobs:
|
|||
with:
|
||||
envFile: './.github/env/global.env'
|
||||
expand: 'true'
|
||||
- name: Pinning Python to ${{ env.MACOS_PYTHON_VERSION }} on MacOS
|
||||
if: matrix.os == 'macos-latest' && matrix.quickstart_language == 'python'
|
||||
run: brew install python@${{ env.MACOS_PYTHON_VERSION }} && brew unlink python@${{ env.MACOS_PYTHON_VERSION }} && brew link --overwrite python@${{ env.MACOS_PYTHON_VERSION }}
|
||||
- name: Verify Python version
|
||||
if: matrix.quickstart_language == 'python'
|
||||
run: python3 --version
|
||||
- name: Upgrade pip and setuptools
|
||||
if: matrix.os == 'macos-latest' && matrix.quickstart_language == 'python'
|
||||
run: pip3 install --upgrade pip && python3 -m pip install --upgrade setuptools
|
||||
- name: Install podman - MacOS
|
||||
timeout-minutes: 15
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo rm -rf `brew --cache`
|
||||
|
@ -73,20 +65,19 @@ jobs:
|
|||
podman machine start || echo "VM might not have started"
|
||||
sleep 10
|
||||
podman machine inspect
|
||||
- name: Install podman-compose
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo pip3 install podman-compose
|
||||
- name: Create symbolic link between Podman and Docker
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo ln -s $(which podman) /usr/local/bin/docker
|
||||
sudo ln -s $(which podman-compose) /usr/local/bin/docker-compose
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Set up OpenJDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Install .NET Core
|
||||
uses: actions/setup-dotnet@v1.9.0
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
- name: Set up Dapr CLI - Mac/Linux
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: wget -q ${{ env.DAPR_INSTALL_URL }}/install.sh -O - | /bin/bash -s ${{ env.DAPR_CLI_VERSION }}
|
||||
|
@ -96,18 +87,31 @@ jobs:
|
|||
- name: Install Dapr
|
||||
run: |
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }} --container-runtime podman
|
||||
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }}
|
||||
dapr --version
|
||||
- name: Install utilities dependencies
|
||||
run: |
|
||||
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
|
||||
pip3 install setuptools wheel
|
||||
pip3 install mechanical-markdown
|
||||
- name: Validate ${{ matrix.quickstart_language }} ${{ matrix.quickstart_variant }} state management
|
||||
- name: Validate building blocks with GO
|
||||
run: |
|
||||
pushd state_management/${{ matrix.quickstart_language }}/${{ matrix.quickstart_variant }}
|
||||
make validate
|
||||
popd
|
||||
variants=("http" "sdk")
|
||||
building_blocks=$(find . -maxdepth 1 -mindepth 1 -type d)
|
||||
for building_block in $building_blocks; do
|
||||
for variant in "${variants[@]}"
|
||||
do
|
||||
if [ ! -d "$building_block/go/$variant" ];
|
||||
then
|
||||
echo "$building_block/go/$variant does not exist."
|
||||
else
|
||||
pushd $building_block/go/$variant
|
||||
echo "Validating $building_block/go/$variant quickstart"
|
||||
make validate
|
||||
popd
|
||||
fi
|
||||
done
|
||||
done
|
||||
- name: Linkcheck README.md
|
||||
run: |
|
||||
make validate
|
||||
make validate
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright 2022 The Dapr Authors
|
||||
# Copyright 2023 The Dapr Authors
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
@ -11,7 +11,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Validate Configuration API
|
||||
name: Validate java quickstart
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
@ -29,10 +29,11 @@ on:
|
|||
- release-*
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate quickstart for `${{ matrix.quickstart_language }}` with `${{ matrix.quickstart_variant }}` on ${{ matrix.os }}
|
||||
name: Validate Java quickstart on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15
|
||||
timeout-minutes: 130
|
||||
env:
|
||||
DAPR_DEFAULT_IMAGE_REGISTRY: GHCR
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install
|
||||
GOVER: 1.18
|
||||
KUBERNETES_VERSION: v1.25.3
|
||||
|
@ -41,8 +42,6 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
quickstart_language: [go, csharp, javascript, python, java]
|
||||
quickstart_variant: [http, sdk]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Check out code
|
||||
|
@ -52,35 +51,34 @@ jobs:
|
|||
with:
|
||||
envFile: './.github/env/global.env'
|
||||
expand: 'true'
|
||||
- name: Pinning Python to ${{ env.MACOS_PYTHON_VERSION }} on MacOS
|
||||
if: matrix.os == 'macos-latest' && matrix.quickstart_language == 'python'
|
||||
run: brew install python@${{ env.MACOS_PYTHON_VERSION }} && brew unlink python@${{ env.MACOS_PYTHON_VERSION }} && brew link --overwrite python@${{ env.MACOS_PYTHON_VERSION }}
|
||||
- name: Verify Python version
|
||||
if: matrix.quickstart_language == 'python'
|
||||
run: python3 --version
|
||||
- name: Upgrade pip and setuptools
|
||||
if: matrix.os == 'macos-latest' && matrix.quickstart_language == 'python'
|
||||
run: pip3 install --upgrade pip && python3 -m pip install --upgrade setuptools
|
||||
- name: Install docker - MacOS
|
||||
- name: Install podman - MacOS
|
||||
timeout-minutes: 15
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: docker-practice/actions-setup-docker@v1
|
||||
with:
|
||||
docker_buildx: false
|
||||
docker_version: 20.10.21
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Set up OpenJDK 11
|
||||
run: |
|
||||
sudo rm -rf `brew --cache`
|
||||
brew upgrade
|
||||
brew install podman
|
||||
which podman-mac-helper
|
||||
podman_helper=$(which podman-mac-helper)
|
||||
sudo ${podman_helper} install
|
||||
podman machine init
|
||||
podman machine start || echo "VM might not have started"
|
||||
sleep 10
|
||||
podman machine inspect
|
||||
- name: Install podman-compose
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo pip3 install podman-compose
|
||||
- name: Create symbolic link between Podman and Docker
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo ln -s $(which podman) /usr/local/bin/docker
|
||||
sudo ln -s $(which podman-compose) /usr/local/bin/docker-compose
|
||||
- name: Set up OpenJDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Install .NET Core
|
||||
uses: actions/setup-dotnet@v1.9.0
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
java-version: 17
|
||||
- name: Set up Dapr CLI - Mac/Linux
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: wget -q ${{ env.DAPR_INSTALL_URL }}/install.sh -O - | /bin/bash -s ${{ env.DAPR_CLI_VERSION }}
|
||||
|
@ -97,11 +95,24 @@ jobs:
|
|||
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
|
||||
pip3 install setuptools wheel
|
||||
pip3 install mechanical-markdown
|
||||
- name: Validate ${{ matrix.quickstart_language }} ${{ matrix.quickstart_variant }} Configuration API
|
||||
- name: Validate building blocks with Java
|
||||
run: |
|
||||
pushd configuration/${{ matrix.quickstart_language }}/${{ matrix.quickstart_variant }}
|
||||
make validate
|
||||
popd
|
||||
variants=("http" "sdk")
|
||||
building_blocks=$(find . -maxdepth 1 -mindepth 1 -type d)
|
||||
for building_block in $building_blocks; do
|
||||
for variant in "${variants[@]}"
|
||||
do
|
||||
if [ ! -d "$building_block/java/$variant" ];
|
||||
then
|
||||
echo "$building_block/java/$variant does not exist."
|
||||
else
|
||||
pushd $building_block/java/$variant
|
||||
echo "Validating $building_block/java/$variant quickstart"
|
||||
make validate
|
||||
popd
|
||||
fi
|
||||
done
|
||||
done
|
||||
- name: Linkcheck README.md
|
||||
run: |
|
||||
make validate
|
||||
make validate
|
|
@ -0,0 +1,113 @@
|
|||
#
|
||||
# Copyright 2023 The Dapr Authors
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Validate javascript quickstart
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- feature/new_quickstarts
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- feature/new_quickstarts
|
||||
- release-*
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate Javascript quickstart on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 130
|
||||
env:
|
||||
DAPR_DEFAULT_IMAGE_REGISTRY: GHCR
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install
|
||||
GOVER: 1.18
|
||||
KUBERNETES_VERSION: v1.25.3
|
||||
KIND_VERSION: v0.17.0
|
||||
KIND_IMAGE_SHA: sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
- name: Load environment variables
|
||||
uses: artursouza/export-env-action@v2
|
||||
with:
|
||||
envFile: './.github/env/global.env'
|
||||
expand: 'true'
|
||||
- name: Install podman - MacOS
|
||||
timeout-minutes: 15
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo rm -rf `brew --cache`
|
||||
brew upgrade
|
||||
brew install podman
|
||||
which podman-mac-helper
|
||||
podman_helper=$(which podman-mac-helper)
|
||||
sudo ${podman_helper} install
|
||||
podman machine init
|
||||
podman machine start || echo "VM might not have started"
|
||||
sleep 10
|
||||
podman machine inspect
|
||||
- name: Install podman-compose
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo pip3 install podman-compose
|
||||
- name: Create symbolic link between Podman and Docker
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo ln -s $(which podman) /usr/local/bin/docker
|
||||
sudo ln -s $(which podman-compose) /usr/local/bin/docker-compose
|
||||
- name: Set up Dapr CLI - Mac/Linux
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: wget -q ${{ env.DAPR_INSTALL_URL }}/install.sh -O - | /bin/bash -s ${{ env.DAPR_CLI_VERSION }}
|
||||
- name: Set up Dapr CLI - Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: powershell -Command "\$$script=iwr -useb ${{ env.DAPR_INSTALL_URL }}/install.ps1; \$$block=[ScriptBlock]::Create(\$$script); invoke-command -ScriptBlock \$$block -ArgumentList ${{ env.DAPR_CLI_VERSION }}"
|
||||
- name: Install Dapr
|
||||
run: |
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }}
|
||||
dapr --version
|
||||
- name: Install utilities dependencies
|
||||
run: |
|
||||
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
|
||||
pip3 install setuptools wheel
|
||||
pip3 install mechanical-markdown
|
||||
- name: Validate building blocks with Javascript
|
||||
run: |
|
||||
variants=("http" "sdk")
|
||||
building_blocks=$(find . -maxdepth 1 -mindepth 1 -type d)
|
||||
for building_block in $building_blocks; do
|
||||
for variant in "${variants[@]}"
|
||||
do
|
||||
if [ ! -d "$building_block/javascript/$variant" ];
|
||||
then
|
||||
echo "$building_block/javascript/$variant does not exist."
|
||||
else
|
||||
pushd $building_block/javascript/$variant
|
||||
echo "Validating $building_block/javascript/$variant quickstart"
|
||||
make validate
|
||||
popd
|
||||
fi
|
||||
done
|
||||
done
|
||||
- name: Linkcheck README.md
|
||||
run: |
|
||||
make validate
|
|
@ -1,154 +0,0 @@
|
|||
#
|
||||
# Copyright 2022 The Dapr Authors
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Validate Bindings
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- feature/new_quickstarts
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- feature/new_quickstarts
|
||||
- release-*
|
||||
jobs:
|
||||
deploy:
|
||||
name: Validate quickstarts on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install
|
||||
GOVER: 1.17
|
||||
KUBERNETES_VERSION: v1.21.1
|
||||
KIND_VERSION: v0.11.0
|
||||
KIND_IMAGE_SHA: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
- name: Load environment variables
|
||||
uses: artursouza/export-env-action@v2
|
||||
with:
|
||||
envFile: './.github/env/global.env'
|
||||
expand: 'true'
|
||||
- name: Pinning Python to ${{ env.MACOS_PYTHON_VERSION }} on MacOS
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: brew install python@${{ env.MACOS_PYTHON_VERSION }} && brew unlink python@${{ env.MACOS_PYTHON_VERSION }} && brew link --overwrite python@${{ env.MACOS_PYTHON_VERSION }}
|
||||
- name: Verify Python version
|
||||
run: python3 --version
|
||||
- name: Upgrade pip and setuptools
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: pip3 install --upgrade pip && python3 -m pip install --upgrade setuptools
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: docker-practice/actions-setup-docker@v1
|
||||
with:
|
||||
docker_buildx: false
|
||||
docker_version: 20.10
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Set up OpenJDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Install .NET Core
|
||||
uses: actions/setup-dotnet@v1.9.0
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
- name: Set up Dapr CLI - Mac/Linux
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: wget -q ${{ env.DAPR_INSTALL_URL }}/install.sh -O - | /bin/bash -s ${{ env.DAPR_CLI_VERSION }}
|
||||
- name: Set up Dapr CLI - Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: powershell -Command "\$$script=iwr -useb ${{ env.DAPR_INSTALL_URL }}/install.ps1; \$$block=[ScriptBlock]::Create(\$$script); invoke-command -ScriptBlock \$$block -ArgumentList ${{ env.DAPR_CLI_VERSION }}"
|
||||
- name: Install Dapr
|
||||
run: |
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }}
|
||||
dapr --version
|
||||
- name: Install utilities dependencies
|
||||
run: |
|
||||
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
|
||||
pip3 install setuptools wheel
|
||||
pip3 install mechanical-markdown
|
||||
- name: Set up Postgres
|
||||
run: |
|
||||
pushd bindings/db/
|
||||
docker compose up -d
|
||||
popd
|
||||
- name: Validate Python http Bindings
|
||||
run: |
|
||||
pushd bindings/python/http
|
||||
make validate
|
||||
popd
|
||||
- name: Validate Python sdk Bindings
|
||||
run: |
|
||||
pushd bindings/python/sdk
|
||||
make validate
|
||||
popd
|
||||
- name: Validate Javascript http Bindings
|
||||
run: |
|
||||
pushd bindings/javascript/http
|
||||
make validate
|
||||
popd
|
||||
# - name: Validate Javascript sdk Bindings
|
||||
# run: |
|
||||
# pushd bindings/javascript/sdk
|
||||
# make validate
|
||||
# popd
|
||||
- name: Validate Java http Bindings
|
||||
run: |
|
||||
pushd bindings/java/http
|
||||
make validate
|
||||
popd
|
||||
- name: Validate Java sdk Bindings
|
||||
run: |
|
||||
pushd bindings/java/sdk
|
||||
make validate
|
||||
popd
|
||||
- name: Validate Go http Bindings
|
||||
run: |
|
||||
pushd bindings/go/http
|
||||
make validate
|
||||
popd
|
||||
- name: Validate Go sdk Bindings
|
||||
run: |
|
||||
pushd bindings/go/sdk
|
||||
make validate
|
||||
popd
|
||||
- name: Validate .NET http Bindings
|
||||
run: |
|
||||
pushd bindings/csharp/http
|
||||
make validate
|
||||
popd
|
||||
- name: Validate .NET sdk Bindings
|
||||
run: |
|
||||
pushd bindings/csharp/sdk
|
||||
make validate
|
||||
popd
|
||||
- name: Linkcheck README.md
|
||||
run: |
|
||||
make validate
|
|
@ -1,100 +0,0 @@
|
|||
#
|
||||
# Copyright 2021 The Dapr Authors
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Validate Service Invocation
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- feature/new_quickstarts
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- feature/new_quickstarts
|
||||
- release-*
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate quickstart for `${{ matrix.quickstart_language }}` with `${{ matrix.quickstart_variant }}` on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
GOVER: 1.17
|
||||
KUBERNETES_VERSION: v1.21.1
|
||||
KIND_VERSION: v0.11.0
|
||||
KIND_IMAGE_SHA: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
quickstart_language: [go, csharp, javascript, python, java]
|
||||
quickstart_variant: [http]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
- name: Load environment variables
|
||||
uses: artursouza/export-env-action@v2
|
||||
with:
|
||||
envFile: './.github/env/global.env'
|
||||
expand: 'true'
|
||||
- name: Pinning Python to ${{ env.MACOS_PYTHON_VERSION }} on MacOS
|
||||
if: matrix.os == 'macos-latest' && matrix.quickstart_language == 'python'
|
||||
run: brew install python@${{ env.MACOS_PYTHON_VERSION }} && brew unlink python@${{ env.MACOS_PYTHON_VERSION }} && brew link --overwrite python@${{ env.MACOS_PYTHON_VERSION }}
|
||||
- name: Verify Python version
|
||||
if: matrix.quickstart_language == 'python'
|
||||
run: python3 --version
|
||||
- name: Upgrade pip and setuptools
|
||||
if: matrix.os == 'macos-latest' && matrix.quickstart_language == 'python'
|
||||
run: pip3 install --upgrade pip && python3 -m pip install --upgrade setuptools
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Set up OpenJDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Install .NET Core
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: |
|
||||
7.0.x
|
||||
- name: Set up Dapr CLI - Mac/Linux
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: wget -q ${{ env.DAPR_INSTALL_URL }}/install.sh -O - | /bin/bash -s ${{ env.DAPR_CLI_VERSION }}
|
||||
- name: Set up Dapr CLI - Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: powershell -Command "\$$script=iwr -useb ${{ env.DAPR_INSTALL_URL }}/install.ps1; \$$block=[ScriptBlock]::Create(\$$script); invoke-command -ScriptBlock \$$block -ArgumentList ${{ env.DAPR_CLI_VERSION }}"
|
||||
- name: Install Dapr
|
||||
run: |
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }} --slim
|
||||
dapr --version
|
||||
- name: Install utilities dependencies
|
||||
run: |
|
||||
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
|
||||
pip3 install setuptools wheel
|
||||
pip3 install mechanical-markdown
|
||||
- name: Validate ${{ matrix.quickstart_language }} ${{ matrix.quickstart_variant }} service invocation
|
||||
run: |
|
||||
pushd service_invocation/${{ matrix.quickstart_language }}/${{ matrix.quickstart_variant }}
|
||||
make validate
|
||||
popd
|
||||
- name: Linkcheck README.md
|
||||
run: |
|
||||
make validate
|
|
@ -1,103 +0,0 @@
|
|||
#
|
||||
# Copyright 2022 The Dapr Authors
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Validate Workflows
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- feature/new_quickstarts
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- feature/new_quickstarts
|
||||
- release-*
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate quickstart for `${{ matrix.quickstart_language }}` with `${{ matrix.quickstart_variant }}` on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install
|
||||
GOVER: 1.17
|
||||
KUBERNETES_VERSION: v1.21.1
|
||||
KIND_VERSION: v0.11.0
|
||||
KIND_IMAGE_SHA: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-10.15]
|
||||
quickstart_language: [csharp]
|
||||
quickstart_variant: [sdk]
|
||||
steps:
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
uses: docker-practice/actions-setup-docker@v1
|
||||
with:
|
||||
docker_buildx: false
|
||||
docker_version: 20.10
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Set up OpenJDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Install .NET Core
|
||||
uses: actions/setup-dotnet@v1.9.0
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
- name: Determine latest Dapr Runtime version including Pre-releases
|
||||
run: |
|
||||
helm repo add dapr https://dapr.github.io/helm-charts/ && helm repo update && export RUNTIME_VERSION=$(helm search repo dapr/dapr --devel --versions | awk '/dapr\/dapr/ {print $3; exit}' )
|
||||
echo "DAPR_RUNTIME_VERSION=$RUNTIME_VERSION" >> $GITHUB_ENV
|
||||
echo "Found $RUNTIME_VERSION"
|
||||
shell: bash
|
||||
- name: Determine latest Dapr Cli version including Pre-releases
|
||||
run: |
|
||||
export CLI_VERSION=$(curl "https://api.github.com/repos/dapr/cli/releases?per_page=1&page=1" --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq '.[0].tag_name'| tr -d '",v')
|
||||
echo "DAPR_CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV
|
||||
echo "Found $CLI_VERSION"
|
||||
shell: bash
|
||||
- name: Set up Dapr CLI - Mac/Linux
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: wget -q ${{ env.DAPR_INSTALL_URL }}/install.sh -O - | /bin/bash -s ${{ env.DAPR_CLI_VERSION }}
|
||||
- name: Set up Dapr CLI - Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: powershell -Command "\$$script=iwr -useb ${{ env.DAPR_INSTALL_URL }}/install.ps1; \$$block=[ScriptBlock]::Create(\$$script); invoke-command -ScriptBlock \$$block -ArgumentList ${{ env.DAPR_CLI_VERSION }}"
|
||||
- name: Install Dapr
|
||||
run: |
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }}
|
||||
dapr --version
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
- name: Install utilities dependencies
|
||||
run: |
|
||||
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
|
||||
pip3 install setuptools wheel
|
||||
pip3 install mechanical-markdown
|
||||
- name: Validate ${{ matrix.quickstart_language }} ${{ matrix.quickstart_variant }} workflows
|
||||
run: |
|
||||
pushd workflows/${{ matrix.quickstart_language }}/${{ matrix.quickstart_variant }}
|
||||
make validate
|
||||
popd
|
||||
- name: Linkcheck README.md
|
||||
run: |
|
||||
make validate
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright 2021 The Dapr Authors
|
||||
# Copyright 2023 The Dapr Authors
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
@ -11,7 +11,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Validate PubSub
|
||||
name: Validate python quickstart
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
@ -29,23 +29,22 @@ on:
|
|||
- release-*
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate quickstart for `${{ matrix.quickstart_language }}` with `${{ matrix.quickstart_variant }}` on ${{ matrix.os }}
|
||||
name: Validate Python quickstart on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15
|
||||
timeout-minutes: 130
|
||||
env:
|
||||
DAPR_DEFAULT_IMAGE_REGISTRY: GHCR
|
||||
GOVER: 1.17
|
||||
KUBERNETES_VERSION: v1.21.1
|
||||
KIND_VERSION: v0.11.0
|
||||
KIND_IMAGE_SHA: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install
|
||||
GOVER: 1.18
|
||||
KUBERNETES_VERSION: v1.25.3
|
||||
KIND_VERSION: v0.17.0
|
||||
KIND_IMAGE_SHA: sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
|
||||
strategy:
|
||||
matrix:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
quickstart_language: [go, csharp, javascript, python, java]
|
||||
quickstart_variant: [http, sdk]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Check out code
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
- name: Load environment variables
|
||||
uses: artursouza/export-env-action@v2
|
||||
|
@ -53,15 +52,15 @@ jobs:
|
|||
envFile: './.github/env/global.env'
|
||||
expand: 'true'
|
||||
- name: Pinning Python to ${{ env.MACOS_PYTHON_VERSION }} on MacOS
|
||||
if: matrix.os == 'macos-latest' && matrix.quickstart_language == 'python'
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: brew install python@${{ env.MACOS_PYTHON_VERSION }} && brew unlink python@${{ env.MACOS_PYTHON_VERSION }} && brew link --overwrite python@${{ env.MACOS_PYTHON_VERSION }}
|
||||
- name: Verify Python version
|
||||
if: matrix.quickstart_language == 'python'
|
||||
run: python3 --version
|
||||
- name: Upgrade pip and setuptools
|
||||
if: matrix.os == 'macos-latest' && matrix.quickstart_language == 'python'
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: pip3 install --upgrade pip && python3 -m pip install --upgrade setuptools
|
||||
- name: Install podman - MacOS
|
||||
timeout-minutes: 15
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo rm -rf `brew --cache`
|
||||
|
@ -74,41 +73,49 @@ jobs:
|
|||
podman machine start || echo "VM might not have started"
|
||||
sleep 10
|
||||
podman machine inspect
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Set up OpenJDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Install .NET Core
|
||||
uses: actions/setup-dotnet@v1.9.0
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
- name: Install podman-compose
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo pip3 install podman-compose
|
||||
- name: Create symbolic link between Podman and Docker
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
sudo ln -s $(which podman) /usr/local/bin/docker
|
||||
sudo ln -s $(which podman-compose) /usr/local/bin/docker-compose
|
||||
- name: Set up Dapr CLI - Mac/Linux
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: wget -q ${{ env.DAPR_INSTALL_URL }}/install.sh -O - | /bin/bash -s ${{ env.DAPR_CLI_VERSION }}
|
||||
- name: Set up Dapr CLI - Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: powershell -Command "\$$script=iwr -useb ${{ env.DAPR_INSTALL_URL }}/install.ps1; \$$block=[ScriptBlock]::Create(\$$script); invoke-command -ScriptBlock \$$block -ArgumentList ${{ env.DAPR_CLI_VERSION }}"
|
||||
run: powershell -Command "\$$script=iwr -useb ${{ env.DAPR_INSTALL_URL }}/install.ps1; \$$block=[ScriptBlock]::Create(\$$script); invoke-command -ScriptBlock \$$block -ArgumentList ${{ env.DAPR_CLI_VERSION }}"
|
||||
- name: Install Dapr
|
||||
run: |
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }} --container-runtime=podman
|
||||
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }}
|
||||
dapr --version
|
||||
- name: Install utilities dependencies
|
||||
run: |
|
||||
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
|
||||
pip3 install setuptools wheel
|
||||
pip3 install mechanical-markdown
|
||||
- name: Validate ${{ matrix.quickstart_language }} ${{ matrix.quickstart_variant }} pubsub
|
||||
- name: Validate building blocks with Python
|
||||
run: |
|
||||
pushd pub_sub/${{ matrix.quickstart_language }}/${{ matrix.quickstart_variant }}
|
||||
make validate
|
||||
popd
|
||||
variants=("http" "sdk")
|
||||
building_blocks=$(find . -maxdepth 1 -mindepth 1 -type d)
|
||||
for building_block in $building_blocks; do
|
||||
for variant in "${variants[@]}"
|
||||
do
|
||||
if [ ! -d "$building_block/python/$variant" ];
|
||||
then
|
||||
echo "$building_block/python/$variant does not exist."
|
||||
else
|
||||
pushd $building_block/python/$variant
|
||||
echo "Validating $building_block/python/$variant quickstart"
|
||||
make validate
|
||||
popd
|
||||
fi
|
||||
done
|
||||
done
|
||||
- name: Linkcheck README.md
|
||||
run: |
|
||||
make validate
|
|
@ -18,13 +18,13 @@ This quickstart includes one service:
|
|||
name: Run and initialize PostgreSQL container
|
||||
expected_return_code:
|
||||
background: true
|
||||
sleep: 5
|
||||
timeout_seconds: 6
|
||||
sleep: 60
|
||||
timeout_seconds: 120
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ../../db
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -18,13 +18,13 @@ This quickstart includes one service:
|
|||
name: Run and initialize PostgreSQL container
|
||||
expected_return_code:
|
||||
background: true
|
||||
sleep: 5
|
||||
timeout_seconds: 6
|
||||
sleep: 60
|
||||
timeout_seconds: 120
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ../../db
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -18,13 +18,13 @@ This quickstart includes one service:
|
|||
name: Run and initialize PostgreSQL container
|
||||
expected_return_code:
|
||||
background: true
|
||||
sleep: 5
|
||||
timeout_seconds: 6
|
||||
sleep: 60
|
||||
timeout_seconds: 120
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ../../db
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -18,13 +18,13 @@ This quickstart includes one service:
|
|||
name: Run and initialize PostgreSQL container
|
||||
expected_return_code:
|
||||
background: true
|
||||
sleep: 5
|
||||
timeout_seconds: 6
|
||||
sleep: 60
|
||||
timeout_seconds: 120
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ../../db
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
@ -60,7 +60,7 @@ timeout_seconds: 30
|
|||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id batch-sdk --app-port 6002 --dapr-http-port 3502 --dapr-grpc-port 60002 --resources-path ../../../components -- go run .
|
||||
dapr run --app-id batch-sdk --app-port 6004 --dapr-http-port 3502 --dapr-grpc-port 60002 --resources-path ../../../components -- go run .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -105,7 +105,7 @@ func main() {
|
|||
var appPort string
|
||||
var okHost bool
|
||||
if appPort, okHost = os.LookupEnv("APP_PORT"); !okHost {
|
||||
appPort = "6002"
|
||||
appPort = "6004"
|
||||
}
|
||||
|
||||
r := mux.NewRouter()
|
||||
|
|
|
@ -18,13 +18,13 @@ This quickstart includes one service:
|
|||
name: Run and initialize PostgreSQL container
|
||||
expected_return_code:
|
||||
background: true
|
||||
sleep: 5
|
||||
timeout_seconds: 6
|
||||
sleep: 60
|
||||
timeout_seconds: 120
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ../../db
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -18,13 +18,13 @@ This quickstart includes one service:
|
|||
name: Run and initialize PostgreSQL container
|
||||
expected_return_code:
|
||||
background: true
|
||||
sleep: 5
|
||||
timeout_seconds: 6
|
||||
sleep: 60
|
||||
timeout_seconds: 120
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ../../db
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -18,13 +18,13 @@ This quickstart includes one service:
|
|||
name: Run and initialize PostgreSQL container
|
||||
expected_return_code:
|
||||
background: true
|
||||
sleep: 5
|
||||
timeout_seconds: 6
|
||||
sleep: 60
|
||||
timeout_seconds: 120
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ../../db
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
@ -60,7 +60,7 @@ timeout_seconds: 30
|
|||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id batch-http --app-port 5001 --dapr-http-port 3500 --resources-path ../../../components -- node index.js
|
||||
dapr run --app-id batch-http --app-port 5004 --dapr-http-port 3500 --resources-path ../../../components -- node index.js
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -24,7 +24,7 @@ const sqlBinding = 'sqldb';
|
|||
|
||||
const DAPR_HOST = process.env.DAPR_HOST || 'http://localhost';
|
||||
const DAPR_HTTP_PORT = process.env.DAPR_HTTP_PORT || '3500';
|
||||
const SERVER_PORT = process.env.APP_PORT || '5001';
|
||||
const SERVER_PORT = process.env.APP_PORT || '5004';
|
||||
const daprUrl = `${DAPR_HOST}:${DAPR_HTTP_PORT}/v1.0/bindings/${sqlBinding}`;
|
||||
|
||||
|
||||
|
|
|
@ -18,13 +18,13 @@ This quickstart includes one service:
|
|||
name: Run and initialize PostgreSQL container
|
||||
expected_return_code:
|
||||
background: true
|
||||
sleep: 5
|
||||
timeout_seconds: 6
|
||||
sleep: 60
|
||||
timeout_seconds: 120
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ../../db
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
@ -60,7 +60,7 @@ timeout_seconds: 30
|
|||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id batch-sdk --app-port 5002 --dapr-http-port 3500 --resources-path ../../../components -- node index.js
|
||||
dapr run --app-id batch-sdk --app-port 5005 --dapr-http-port 3500 --resources-path ../../../components -- node index.js
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -24,7 +24,7 @@ const postgresBindingName = "sqldb";
|
|||
const daprHost = process.env.DAPR_HOST || 'http://localhost';
|
||||
const daprPort = process.env.DAPR_HTTP_PORT || '3500';
|
||||
const serverHost = "127.0.0.1";
|
||||
const serverPort = process.env.APP_PORT || '5002';
|
||||
const serverPort = process.env.APP_PORT || '5005';
|
||||
|
||||
const client = new DaprClient(daprHost, daprPort);
|
||||
|
||||
|
@ -48,7 +48,7 @@ async function processBatch(){
|
|||
orders.forEach(order => {
|
||||
let sqlCmd = `insert into orders (orderid, customer, price) values (${order.orderid}, '${order.customer}', ${order.price});`;
|
||||
let payload = `{"sql": "${sqlCmd}"} `;
|
||||
console.log(payload);
|
||||
console.log(sqlCmd);
|
||||
client.binding.send(postgresBindingName, "exec", "", JSON.parse(payload));
|
||||
});
|
||||
console.log('Finished processing batch');
|
||||
|
|
|
@ -18,13 +18,13 @@ This quickstart includes one service:
|
|||
name: Run and initialize PostgreSQL container
|
||||
expected_return_code:
|
||||
background: true
|
||||
sleep: 5
|
||||
timeout_seconds: 6
|
||||
sleep: 60
|
||||
timeout_seconds: 120
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ../../db
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -18,13 +18,13 @@ This quickstart includes one service:
|
|||
name: Run and initialize PostgreSQL container
|
||||
expected_return_code:
|
||||
background: true
|
||||
sleep: 5
|
||||
timeout_seconds: 6
|
||||
sleep: 60
|
||||
timeout_seconds: 120
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ../../db
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
@ -39,7 +39,7 @@ name: Install python dependencies
|
|||
|
||||
```bash
|
||||
cd ./batch
|
||||
pip3 install -r requirements.txt
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
dapr
|
||||
Flask
|
||||
typing-extensions
|
|
@ -49,7 +49,7 @@ match_order: none
|
|||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
dapr run --app-id order-processor-http --resources-path ../../../components/ --app-port 7001 -- dotnet run --project .
|
||||
dapr run --app-id order-processor-http --resources-path ../../../components/ --app-port 7003 -- dotnet run --project .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:7001",
|
||||
"applicationUrl": "http://localhost:7003",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
|
|
@ -92,9 +92,10 @@ func startServerToListen(subscriptionId *string) {
|
|||
Handler: r,
|
||||
}
|
||||
r.HandleFunc("/configuration/configstore/{configItem}", configUpdateHandler).Methods("POST")
|
||||
|
||||
fmt.Println("Current time before shutdown: " + time.Now().String())
|
||||
// Unsubscribe to config updates and shutdown http server after 20 seconds
|
||||
time.AfterFunc(20*time.Second, func() {
|
||||
fmt.Println("Current time while shutdown: " + time.Now().String())
|
||||
unsubscribeFromConfigUpdates(*subscriptionId)
|
||||
fmt.Println("Shutting down HTTP server")
|
||||
err := httpServer.Shutdown(context.Background())
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
dapr
|
||||
typing-extensions
|
|
@ -46,7 +46,7 @@ sleep: 10
|
|||
|
||||
|
||||
```bash
|
||||
dapr run --app-id order-processor-http --resources-path ../../../components/ --app-port 7001 -- dotnet run --project .
|
||||
dapr run --app-id order-processor-http --resources-path ../../../components/ --app-port 7004 -- dotnet run --project .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:7001",
|
||||
"applicationUrl": "http://localhost:7004",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ sleep: 10
|
|||
|
||||
|
||||
```bash
|
||||
dapr run --app-id order-processor --resources-path ../../../components/ --app-port 7002 -- dotnet run --project .
|
||||
dapr run --app-id order-processor --resources-path ../../../components/ --app-port 7005 -- dotnet run --project .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:7002",
|
||||
"applicationUrl": "http://localhost:7005",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ sleep: 15
|
|||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
dapr run --app-port 6001 --app-id order-processor --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
|
||||
dapr run --app-port 6002 --app-id order-processor --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -63,7 +63,7 @@ func postOrder(w http.ResponseWriter, r *http.Request) {
|
|||
func main() {
|
||||
appPort := os.Getenv("APP_PORT")
|
||||
if appPort == "" {
|
||||
appPort = "6001"
|
||||
appPort = "6002"
|
||||
}
|
||||
|
||||
r := mux.NewRouter()
|
||||
|
|
|
@ -27,7 +27,7 @@ sleep: 15
|
|||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
dapr run --app-port 6002 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
|
||||
dapr run --app-port 6005 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -20,7 +20,7 @@ var sub = &common.Subscription{
|
|||
func main() {
|
||||
appPort := os.Getenv("APP_PORT")
|
||||
if appPort == "" {
|
||||
appPort = "6002"
|
||||
appPort = "6005"
|
||||
}
|
||||
|
||||
// Create the new server on appPort and add a topic listener
|
||||
|
|
|
@ -42,7 +42,7 @@ sleep: 10
|
|||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id order-processor-http --resources-path ../../../components/ --app-port 5001 -- node .
|
||||
dapr run --app-id order-processor-http --resources-path ../../../components/ --app-port 5003 -- node .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
@ -76,7 +76,7 @@ sleep: 10
|
|||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout-http --resources-path ../../../components/ --app-port 5001 -- node .
|
||||
dapr run --app-id checkout-http --resources-path ../../../components/ --app-port 5003 -- node .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import express from 'express';
|
||||
import bodyParser from 'body-parser';
|
||||
|
||||
const APP_PORT = process.env.APP_PORT ?? '5001';
|
||||
const APP_PORT = process.env.APP_PORT ?? '5003';
|
||||
|
||||
const app = express();
|
||||
app.use(bodyParser.json({ type: 'application/*+json' }));
|
||||
|
|
|
@ -22,7 +22,7 @@ name: run
|
|||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
pip3 install -r requirements.txt
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -2,3 +2,4 @@ Flask
|
|||
dapr
|
||||
cloudevents
|
||||
uvicorn
|
||||
typing-extensions
|
|
@ -20,7 +20,7 @@ name: Install python dependencies
|
|||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
pip3 install -r requirements.txt
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
dapr
|
||||
typing-extensions
|
|
@ -43,7 +43,7 @@ sleep: 10
|
|||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
dapr run --app-port 7001 --app-id order-processor --app-protocol http --dapr-http-port 3501 -- dotnet run
|
||||
dapr run --app-port 7006 --app-id order-processor --app-protocol http --dapr-http-port 3501 -- dotnet run
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -2,7 +2,7 @@ version: 1
|
|||
apps:
|
||||
- appDirPath: ./order-processor/
|
||||
appID: order-processor
|
||||
appPort: 7001
|
||||
appPort: 7006
|
||||
command: ["dotnet", "run"]
|
||||
- appID: checkout
|
||||
appDirPath: ./checkout/
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:7001",
|
||||
"applicationUrl": "http://localhost:7006",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ sleep: 15
|
|||
```bash
|
||||
cd ./order-processor
|
||||
dapr run \
|
||||
--app-port 6001 \
|
||||
--app-port 6006 \
|
||||
--app-id order-processor \
|
||||
--app-protocol http \
|
||||
--dapr-http-port 3501 \
|
||||
|
|
|
@ -2,7 +2,7 @@ version: 1
|
|||
apps:
|
||||
- appDirPath: ./order-processor/
|
||||
appID: order-processor
|
||||
appPort: 6001
|
||||
appPort: 6006
|
||||
command: ["go", "run", "."]
|
||||
- appID: checkout
|
||||
appDirPath: ./checkout/
|
||||
|
|
|
@ -28,7 +28,7 @@ func main() {
|
|||
|
||||
// Start the server listening on port 6001
|
||||
// This is a blocking call
|
||||
err := http.ListenAndServe(":6001", r)
|
||||
err := http.ListenAndServe(":6006", r)
|
||||
if err != http.ErrServerClosed {
|
||||
log.Println("Error starting HTTP server")
|
||||
}
|
||||
|
|
|
@ -21,7 +21,8 @@ name: Install Python dependencies
|
|||
-->
|
||||
|
||||
```bash
|
||||
pip3 install -r order-processor/requirements.txt
|
||||
cd ./order-processor
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
@ -54,7 +55,8 @@ name: Install Python dependencies
|
|||
-->
|
||||
|
||||
```bash
|
||||
pip3 install -r checkout/requirements.txt
|
||||
cd ./checkout
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
requests
|
||||
typing-extensions
|
|
@ -1,2 +1,3 @@
|
|||
Flask
|
||||
dapr
|
||||
typing-extensions
|
|
@ -20,7 +20,7 @@ name: Install python dependencies
|
|||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
pip3 install -r requirements.txt
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
dapr
|
||||
typing-extensions
|
|
@ -683,7 +683,7 @@ Our client persists state by simply POSTing JSON key-value pairs (see `react-cal
|
|||
If you are using Visual Studio Code, you can debug this application using the preconfigured launch.json and task.json files in the .vscode folder.
|
||||
The .vscode folder has already been modified in the project to allow users to launch a compound configuration called "Full Dapr App" which will run all applications and allow you to debug in VS Code.
|
||||
|
||||
For more information on how to configure the files visit [How-To: Debug multiple Dapr applications](https://docs.dapr.io/developing-applications/ides/vscode/vscode-how-to-debug-multiple-dapr-apps/)
|
||||
For more information on how to configure the files visit [How-To: Debug multiple Dapr applications](https://docs.dapr.io/developing-applications/local-development/ides/vscode/vscode-how-to-debug-multiple-dapr-apps/)
|
||||
|
||||
> **Note**: You still need to edit your environment variables for Flask and ASPNETCORE_URLS
|
||||
**Note**: Dapr offers a preview [Dapr Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-dapr) for local development which enables users a variety of features related to better managing their Dapr applications and debugging of your Dapr applications for all supported Dapr languages which are .NET, Go, PHP, Python and Java.
|
||||
|
|
|
@ -433,7 +433,7 @@ To see that services have stopped running, run `dapr list`, noting that your ser
|
|||
If you are using Visual Studio Code, you can debug this application using the preconfigured launch.json and task.json files in the .vscode folder.
|
||||
The .vscode folder has already been modified in the project to allow users to launch a compound configuration called "Node/Python Dapr" which will run both applications and allow you to debug in VS Code.
|
||||
|
||||
For more information on how to configure the files visit [How-To: Debug multiple Dapr applications](https://docs.dapr.io/developing-applications/ides/vscode/vscode-how-to-debug-multiple-dapr-apps/)
|
||||
For more information on how to configure the files visit [How-To: Debug multiple Dapr applications](https://docs.dapr.io/developing-applications/local-development/ides/vscode/vscode-how-to-debug-multiple-dapr-apps/)
|
||||
|
||||
**Note**: Dapr offers a preview [Dapr Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-dapr) for local development which enables users a variety of features related to better managing their Dapr applications and debugging of your Dapr applications for all supported Dapr languages which are .NET, Go, PHP, Python and Java.
|
||||
|
||||
|
|
Loading…
Reference in New Issue