integrate-playground #648
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
--- | |
name: integrate-playground | |
on: | |
schedule: | |
# times are in UTC | |
- cron: '19 21 * * *' | |
pull_request: | |
branches: | |
- master | |
- release-* | |
paths-ignore: | |
- '**.html' | |
- '**.md' | |
- 'CNAME' | |
- 'LICENSE' | |
- 'doc/**' | |
- 'embed/templates/examples/**' | |
- 'embed/templates/examples/**' | |
- 'components/client/**' | |
- 'components/ctl/**' | |
- 'components/cluster/**' | |
- 'components/doc/**' | |
- 'components/errdoc/**' | |
- 'components/dm/**' | |
- 'server/**' | |
- 'pkg/version/version.go' | |
- '.github/workflows/integrate-cluster**' | |
- '.github/workflows/integrate-dm**' | |
- '.github/workflows/integrate-tiup**' | |
jobs: | |
playground: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: true | |
matrix: | |
cases: | |
- "test_playground" | |
env: | |
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }} | |
steps: | |
- name: Set up Go 1.21 | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.x | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
with: | |
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 }} | |
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 }} | |
run: | | |
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 }} | |
if: ${{ failure() }} | |
# if: always() | |
run: | | |
# ignore the rocksdb | |
find ${{ env.working-directory }}/tests/tiup-playground/_tmp/home/data -type f -name "*.log" | grep -vE '/data/(raft|db|region-meta)/' | xargs tar czvf ${{ env.working-directory }}/playground.logs.tar.gz | |
- name: Upload component log | |
if: ${{ failure() }} | |
# if: always() | |
uses: actions/upload-artifact@v1 | |
with: | |
name: playground_logs | |
path: ${{ env.working-directory }}/playground.logs.tar.gz | |
- name: Output playground debug log | |
working-directory: ${{ env.working-directory }} | |
if: ${{ failure() }} | |
# if: always() | |
run: | | |
for f in $(find ${{ env.working-directory }}/tests/tiup-playground/_tmp/home/data -type f -name "*.log" | grep -vE '/data/(raft|db|region-meta)/'); do echo "${f}" && cat "${f}"; done | |
- name: Upload coverage to Codecov | |
working-directory: ${{ env.working-directory }} | |
run: | | |
curl -Os https://uploader.codecov.io/latest/linux/codecov | |
chmod +x codecov | |
./codecov -F playground -s ${{ env.working-directory }}/tests/tiup-playground/cover -f '*.out' |