Skip to content

Commit

Permalink
Fix/tests wrong path (#794)
Browse files Browse the repository at this point in the history
  • Loading branch information
9547 authored Sep 19, 2020
1 parent 169e7cb commit 8ca0da1
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 135 deletions.
100 changes: 50 additions & 50 deletions .github/workflows/install.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
name: install

on:
pull_request:
branches:
- master
- release-*
pull_request:
branches:
- master
- release-*

jobs:
install:
name: Install
runs-on: ubuntu-latest
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Install And Check
working-directory: ${{env.working-directory}}
run: |
sh install.sh
source ~/.profile
which tiup || (echo "no tiup found" && exit 1)
! tiup update --self | grep -i "WARN: adding root certificate"
local_install:
name: Local Install
runs-on: ubuntu-latest
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Build TiUP
working-directory: ${{env.working-directory}}
run: make build
- name: Setup TiUP
run: |
mkdir -p ~/.tiup/bin
curl https://tiup-mirrors.pingcap.com/root.json -o ~/.tiup/bin/root.json
- name: Clone Mirror
working-directory: ${{env.working-directory}}
run: ./bin/tiup mirror clone test-mirror
- name: Local Install And Check
working-directory: ${{env.working-directory}}/test-mirror
run: |
sh local_install.sh
source ~/.profile
which tiup || (echo "no tiup found" && exit 1)
! tiup update --self | grep -i "WARN: adding root certificate"
install:
name: Install
runs-on: ubuntu-latest
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Install And Check
working-directory: ${{ env.working-directory }}
run: |
sh install.sh
source ~/.profile
which tiup || (echo "no tiup found" && exit 1)
! tiup update --self | grep -i "WARN: adding root certificate"
local_install:
name: Local Install
runs-on: ubuntu-latest
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Build TiUP
working-directory: ${{ env.working-directory }}
run: make build
- name: Setup TiUP
run: |
mkdir -p ~/.tiup/bin
curl https://tiup-mirrors.pingcap.com/root.json -o ~/.tiup/bin/root.json
- name: Clone Mirror
working-directory: ${{ env.working-directory }}
run: ./bin/tiup mirror clone test-mirror
- name: Local Install And Check
working-directory: ${{ env.working-directory }}/test-mirror
run: |
sh local_install.sh
source ~/.profile
which tiup || (echo "no tiup found" && exit 1)
! tiup update --self | grep -i "WARN: adding root certificate"
31 changes: 15 additions & 16 deletions .github/workflows/integrate-cluster-cmd.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: integrate-cluster-cmd

on:
Expand Down Expand Up @@ -35,19 +34,19 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Build build_integration_test
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
export GOPATH=${GITHUB_WORKSPACE}/go
export PATH=$PATH:$GOPATH/bin
make build_integration_test
- name: Build the docker-compose stack
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
# with --dev the first run will fail for unknow reason, just retry it and will success now..
run: TIUP_CLUSTER_ROOT=${{env.working-directory}} ./docker/up.sh --daemon --dev || TIUP_CLUSTER_ROOT=${{env.working-directory}} ./docker/up.sh --daemon --dev
run: TIUP_CLUSTER_ROOT=${{ env.working-directory }} ./docker/up.sh --daemon --dev || TIUP_CLUSTER_ROOT=${{ env.working-directory }} ./docker/up.sh --daemon --dev

- name: Check running containers
run: |
Expand All @@ -57,31 +56,31 @@ jobs:
- name: Run test suite
id: test
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
# should not use -it
# ref: https://stackoverflow.com/questions/43099116/error-the-input-device-is-not-a-tty
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/run.sh ${{matrix.cases}}
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/run.sh ${{matrix.cases}}
- name: Collect component log
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
# if: steps.test.outputs.exit_code != 0
if: always()
run: |
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/script/pull_log.sh /tiup-cluster/logs
ls ${{env.working-directory}}
tar czvf ${{env.working-directory}}/logs.tar.gz ${{env.working-directory}}/logs/
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/script/pull_log.sh /tiup-cluster/logs
ls ${{ env.working-directory }}
tar czvf ${{ env.working-directory }}/logs.tar.gz ${{ env.working-directory }}/logs/
- name: Upload component log
# if: steps.test.outputs.exit_code != 0
if: always()
uses: actions/upload-artifact@v1
with:
name: component_logs
path: ${{env.working-directory}}/logs.tar.gz
path: ${{ env.working-directory }}/logs.tar.gz

- name: Output cluster debug log
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
if: always()
run: |
pwd
Expand All @@ -91,6 +90,6 @@ jobs:
"cat ./tests/*.log" || true
- name: Upload coverage to Codecov
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
curl -s https://codecov.io/bash | bash -s - -F integrate,cluster -s ${{env.working-directory}}/tests/tiup-cluster/cover -f '*.out'
curl -s https://codecov.io/bash | bash -s - -F integrate,cluster -s ${{ env.working-directory }}/tests/tiup-cluster/cover -f '*.out'
31 changes: 15 additions & 16 deletions .github/workflows/integrate-cluster-scale.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: integrate-cluster-scale

on:
Expand Down Expand Up @@ -35,19 +34,19 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Build build_integration_test
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
export GOPATH=${GITHUB_WORKSPACE}/go
export PATH=$PATH:$GOPATH/bin
make build_integration_test
- name: Build the docker-compose stack
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
# with --dev the first run will fail for unknow reason, just retry it and will success now..
run: TIUP_CLUSTER_ROOT=${{env.working-directory}} ./docker/up.sh --daemon --dev || TIUP_CLUSTER_ROOT=${{env.working-directory}} ./docker/up.sh --daemon --dev
run: TIUP_CLUSTER_ROOT=${{ env.working-directory }} ./docker/up.sh --daemon --dev || TIUP_CLUSTER_ROOT=${{ env.working-directory }} ./docker/up.sh --daemon --dev

- name: Check running containers
run: |
Expand All @@ -57,31 +56,31 @@ jobs:
- name: Run test suite
id: test
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
# should not use -it
# ref: https://stackoverflow.com/questions/43099116/error-the-input-device-is-not-a-tty
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/run.sh ${{matrix.cases}}
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/run.sh ${{matrix.cases}}
- name: Collect component log
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
# if: steps.test.outputs.exit_code != 0
if: always()
run: |
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/script/pull_log.sh /tiup-cluster/logs
ls ${{env.working-directory}}
tar czvf ${{env.working-directory}}/logs.tar.gz ${{env.working-directory}}/logs/
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/script/pull_log.sh /tiup-cluster/logs
ls ${{ env.working-directory }}
tar czvf ${{ env.working-directory }}/logs.tar.gz ${{ env.working-directory }}/logs/
- name: Upload component log
# if: steps.test.outputs.exit_code != 0
if: always()
uses: actions/upload-artifact@v1
with:
name: component_logs
path: ${{env.working-directory}}/logs.tar.gz
path: ${{ env.working-directory }}/logs.tar.gz

- name: Output cluster debug log
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
if: always()
run: |
pwd
Expand All @@ -91,6 +90,6 @@ jobs:
"cat ./tests/*.log" || true
- name: Upload coverage to Codecov
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
curl -s https://codecov.io/bash | bash -s - -F integrate,cluster -s ${{env.working-directory}}/tests/tiup-cluster/cover -f '*.out'
curl -s https://codecov.io/bash | bash -s - -F integrate,cluster -s ${{ env.working-directory }}/tests/tiup-cluster/cover -f '*.out'
21 changes: 10 additions & 11 deletions .github/workflows/integrate-dm.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: integrate-dm

on:
Expand Down Expand Up @@ -35,23 +34,23 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}

- name: Build build_integration_test
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
export GOPATH=${GITHUB_WORKSPACE}/go
export PATH=$PATH:$GOPATH/bin
make build_integration_test
make tiup
- name: Build the docker-compose stack
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
# with --dev the first run will fail for unknow reason, just retry it and will success now..
run: |
cd ${{env.working-directory}}/docker
TIUP_CLUSTER_ROOT=${{env.working-directory}} ./up.sh --daemon --dev --compose ./docker-compose.dm.yml || TIUP_CLUSTER_ROOT=${{env.working-directory}} ./up.sh --daemon --dev --compose ./docker-compose.dm.yml
cd ${{ env.working-directory }}/docker
TIUP_CLUSTER_ROOT=${{ env.working-directory }} ./up.sh --daemon --dev --compose ./docker-compose.dm.yml || TIUP_CLUSTER_ROOT=${{ env.working-directory }} ./up.sh --daemon --dev --compose ./docker-compose.dm.yml
- name: Check running containers
run: |
Expand All @@ -61,13 +60,13 @@ jobs:
- name: Run test suite
id: test
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
# should not use -it
# ref: https://stackoverflow.com/questions/43099116/error-the-input-device-is-not-a-tty
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-dm/run.sh ${{matrix.cases}}
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-dm/run.sh ${{matrix.cases}}
- name: Upload coverage to Codecov
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
curl -s https://codecov.io/bash | bash -s - -F integrate,dm -s ${{env.working-directory}}/tests/tiup-dm/cover -f '*.out'
curl -s https://codecov.io/bash | bash -s - -F integrate,dm -s ${{ env.working-directory }}/tests/tiup-dm/cover -f '*.out'
23 changes: 11 additions & 12 deletions .github/workflows/integrate-playground.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: integrate-playground

on:
Expand Down Expand Up @@ -33,38 +32,38 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Build build_tiup_playground_test
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
export GOPATH=${GITHUB_WORKSPACE}/go
export PATH=$PATH:$GOPATH/bin
make tiup build_tiup_playground_test
- name: Run test suite
id: test
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
export PATH=$PATH:${{env.working-directory}}/bin/
bash ${{env.working-directory}}/tests/tiup-playground/${{matrix.cases}}.sh
export PATH=$PATH:${{ env.working-directory }}/bin/
bash ${{ env.working-directory }}/tests/tiup-playground/${{matrix.cases}}.sh
- name: Collect component log
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
# if: steps.test.outputs.exit_code != 0
if: always()
run: |
find ${{env.working-directory}}/tests/tiup-playground/_tmp/home/data -type f | grep -E '*/ti.*/ti.*.log$' | xargs tar czvf ${{env.working-directory}}/playground.logs.tar.gz
find ${{ env.working-directory }}/tests/tiup-playground/_tmp/home/data -type f | grep -E '*/ti.*/ti.*.log$' | xargs tar czvf ${{ env.working-directory }}/playground.logs.tar.gz
- name: Upload component log
# if: steps.test.outputs.exit_code != 0
if: always()
uses: actions/upload-artifact@v1
with:
name: playground_logs
path: ${{env.working-directory}}/playground.logs.tar.gz
path: ${{ env.working-directory }}/playground.logs.tar.gz

- name: Upload coverage to Codecov
working-directory: ${{env.working-directory}}
working-directory: ${{ env.working-directory }}
run: |
curl -s https://codecov.io/bash | bash -s - -F integrate,playground -s ${{env.working-directory}}/tests/tiup-playground/cover -f '*.out'
curl -s https://codecov.io/bash | bash -s - -F integrate,playground -s ${{ env.working-directory }}/tests/tiup-playground/cover -f '*.out'
Loading

0 comments on commit 8ca0da1

Please sign in to comment.