From 416fe5e4c8f1e84f4ac678e42ae25f1c6375a1eb Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Fri, 30 Oct 2020 23:52:05 +0300 Subject: [PATCH] run tests from micro-tests repo Signed-off-by: Vasiliy Tolstov --- .github/workflows/build.yml | 26 +++++++++++++++++++++----- .github/workflows/pr.yml | 24 ++++++++++++++++++++---- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cce94f06..24ca256d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ name: build on: - push: + push: branches: - master jobs: @@ -12,20 +12,36 @@ jobs: uses: actions/setup-go@v1 with: go-version: 1.15 - - name: checkout - uses: actions/checkout@v2 - name: cache uses: actions/cache@v2 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-go- - - name: deps + - name: sdk checkout + uses: actions/checkout@v2 + - name: sdk deps run: go get -v -t -d ./... - - name: test + - name: sdk test env: INTEGRATION_TESTS: yes run: go test -mod readonly -v ./... + - name: tests checkout + uses: actions/checkout@v2 + with: + repository: unistack-org/micro-tests + ref: refs/heads/master + path: micro-tests + fetch-depth: 1 + - name: tests deps + run: | + cd micro-tests + go mod edit -replace="github.com/unistack-org/micro/v3=../" + go get -v -t -d ./... + - name: tests test + env: + INTEGRATION_TESTS: yes + run: cd micro-tests && go test -mod readonly -v ./... lint: name: lint runs-on: ubuntu-latest diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index fd848502..c0672750 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,20 +12,36 @@ jobs: uses: actions/setup-go@v1 with: go-version: 1.15 - - name: checkout - uses: actions/checkout@v2 - name: cache uses: actions/cache@v2 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-go- - - name: deps + - name: sdk checkout + uses: actions/checkout@v2 + - name: sdk deps run: go get -v -t -d ./... - - name: test + - name: sdk test env: INTEGRATION_TESTS: yes run: go test -mod readonly -v ./... + - name: tests checkout + uses: actions/checkout@v2 + with: + repository: unistack-org/micro-tests + ref: refs/heads/master + path: micro-tests + fetch-depth: 1 + - name: tests deps + run: | + cd micro-tests + go mod edit -replace="github.com/unistack-org/micro/v3=../" + go get -v -t -d ./... + - name: tests test + env: + INTEGRATION_TESTS: yes + run: cd micro-tests && go test -mod readonly -v ./... lint: name: lint runs-on: ubuntu-latest