diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 1efc44dedfc9..5faa5f70b54e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -3,43 +3,16 @@ name: regression check on: [push] jobs: - regression-check: - name: run regression test suite + pgbuild: + name: build postgres runs-on: ubuntu-latest - steps: - - name: Checkout uses: actions/checkout@v2 with: submodules: true fetch-depth: 2 - - name: Form variables for notification message - id: git_info_grab - run: | - git_stat=$(git show --stat=50) - git_stat="${git_stat//'%'/'%25'}" - git_stat="${git_stat//$'\n'/'%0A'}" - git_stat="${git_stat//$'\r'/'%0D'}" - git_stat="${git_stat// / }" # space -> 'Space En', as github tends to eat ordinary spaces - echo "::set-output name=git_stat::$git_stat" - echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - echo "##[set-output name=git_branch;]$(echo ${GITHUB_REF#refs/heads/})" - - - name: Send notification - uses: appleboy/telegram-action@master - with: - to: ${{ secrets.TELEGRAM_TO }} - token: ${{ secrets.TELEGRAM_TOKEN }} - format: markdown - args: | - *@${{ github.actor }} pushed to* [${{ github.repository }}:${{steps.git_info_grab.outputs.git_branch}}](github.com/${{ github.repository }}/commit/${{steps.git_info_grab.outputs.sha_short }}) - - ``` - ${{ steps.git_info_grab.outputs.git_stat }} - ``` - - name: Install postgres dependencies run: | sudo apt update @@ -62,6 +35,38 @@ jobs: run: | ./pgbuild.sh + - name: Upload postgres build + uses: actions/upload-artifact@v2 + with: + name: pg_build + path: | + tmp_install/bin + tmp_install/include + tmp_install/lib + tmp_install/share + tmp_install/build/src/test/regress/pg_regress + + pg_regress: + name: postgres regression test + needs: pgbuild + runs-on: ubuntu-latest + steps: + - name: Load pg build + uses: actions/download-artifact@v2 + with: + name: pg_build + + - name: Run pg_regress + run: | + pwd + ls -al + cd build && make check + + zenith_build: + name: build zenith crates + needs: pgbuild + runs-on: ubuntu-latest + steps: - name: Install rust run: | sudo apt install -y cargo @@ -83,6 +88,77 @@ jobs: run: | cargo build + - name: Upload zenith build + uses: actions/upload-artifact@v2 + with: + name: zenith_build_with_deps + path: | + ~/.cargo/registry + ~/.cargo/git + target + + zenith_integration: + name: zenith integration tests + needs: zenith_build + runs-on: ubuntu-latest + steps: + - name: Load pg build + uses: actions/download-artifact@v2 + with: + name: pg_build + + - name: Load zenith build + uses: actions/download-artifact@v2 + with: + name: zenith_build_with_deps + - name: Run test run: | cargo test --test test_pageserver -- --nocapture --test-threads=1 + + zenith_fmt: + name: check code formatting + needs: zenith_build + runs-on: ubuntu-latest + steps: + - name: Load zenith build + uses: actions/download-artifact@v2 + with: + name: zenith_build_with_deps + + - name: Run cargo fmt + run: | + cargo fmt -- --check + + notify: + name: send notifications + needs: pgbuild + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Form variables for notification message + id: git_info_grab + run: | + git_stat=$(git show --stat=50) + git_stat="${git_stat//'%'/'%25'}" + git_stat="${git_stat//$'\n'/'%0A'}" + git_stat="${git_stat//$'\r'/'%0D'}" + git_stat="${git_stat// / }" # space -> 'Space En', as github tends to eat ordinary spaces + echo "::set-output name=git_stat::$git_stat" + echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + echo "##[set-output name=git_branch;]$(echo ${GITHUB_REF#refs/heads/})" + + - name: Send notification + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} + format: markdown + args: | + *@${{ github.actor }} pushed to* [${{ github.repository }}:${{steps.git_info_grab.outputs.git_branch}}](github.com/${{ github.repository }}/commit/${{steps.git_info_grab.outputs.sha_short }}) + + ``` + ${{ steps.git_info_grab.outputs.git_stat }} + ```