forked from dapr/php-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor StateManager to use the new client. (dapr#101)
* Deprecate old state manager * Try to safely replace the old statemanager * Update tests * Move transactional state * Update transaction tests * If no etag, then bail * Use latest rc * Update to use new client in integration tests * address runtime issues * decode results * Deletect failures better * Handle cases when it is not a string * Ensure we use default value * Make the tests more better * Test more versions of dapr
- Loading branch information
1 parent
f87e3d3
commit 5e2e0b4
Showing
19 changed files
with
1,229 additions
and
665 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,18 +70,88 @@ jobs: | |
|
||
- name: Run test suite | ||
run: composer run-script lint | ||
build-integration-test-containers: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
image: [ 'caddy', 'tests' ] | ||
include: | ||
- image: caddy | ||
dockerfile: images/caddy.Dockerfile | ||
target: base | ||
- image: tests | ||
dockerfile: images/tests.Dockerfile | ||
target: production | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@master | ||
with: | ||
install: true | ||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.${{ matrix.image }}-cache | ||
key: ${{ runner.os }}-${{ matrix.image }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.image }}- | ||
- uses: shivammathur/[email protected] | ||
with: | ||
php-version: 8.0 | ||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./ | ||
file: ${{ matrix.dockerfile }} | ||
push: false | ||
pull: true | ||
outputs: type=docker,dest=/tmp/${{ matrix.image }}.tar | ||
target: ${{ matrix.target }} | ||
tags: ${{ matrix.image }}:${{ github.sha }} | ||
builder: ${{ steps.buildx.outputs.name }} | ||
cache-from: type=local,src=/tmp/.${{ matrix.image }}-cache | ||
cache-to: type=local,mode=max,dest=/tmp/.${{ matrix.image }}-cache | ||
- name: upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.image }} | ||
path: /tmp/${{ matrix.image }}.tar | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-integration-test-containers | ||
timeout-minutes: 5 | ||
strategy: | ||
matrix: | ||
dapr-version: [ 1.3.0-rc.1, 1.2.0, 1.2.1, 1.2.2 ] | ||
steps: | ||
- name: Download Caddy Image | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: caddy | ||
path: /tmp | ||
- name: Download Tests Image | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: tests | ||
path: /tmp | ||
- name: Import images | ||
run: | | ||
docker load --input /tmp/caddy.tar | ||
docker load --input /tmp/tests.tar | ||
- uses: actions/checkout@v2 | ||
- uses: shivammathur/[email protected] | ||
with: | ||
php-version: 8.0 | ||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
- name: Integration Environment Startup | ||
run: composer run-script start | ||
env: | ||
DAPR_VERSION: ${{ matrix.dapr-version }} | ||
run: docker-compose up -d | ||
- name: Wait for environment stabilization | ||
run: sleep 10 | ||
- name: Execute Tests | ||
|
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
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
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
Oops, something went wrong.