Skip to content

Commit

Permalink
Add local install test
Browse files Browse the repository at this point in the history
Signed-off-by: lucklove <gnu.crazier@gmail.com>
  • Loading branch information
lucklove committed Jul 8, 2020
1 parent 3dad2a0 commit 2b6b4f4
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
- release-*

jobs:
build:
name: install
install:
name: Install
runs-on: ubuntu-latest
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
Expand All @@ -23,4 +23,31 @@ jobs:
run: |
sh install.sh
source ~/.profile
which tiup || (echo "no tiup found" && exit 1)
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)

0 comments on commit 2b6b4f4

Please sign in to comment.