mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-26 07:39:58 +00:00
87 lines
2.5 KiB
YAML
87 lines
2.5 KiB
YAML
name: regression check
|
||
|
||
on: [push]
|
||
|
||
jobs:
|
||
regression-check:
|
||
timeout-minutes: 30
|
||
name: run regression test suite
|
||
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
|
||
sudo apt install build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libcurl4-openssl-dev
|
||
|
||
- name: Set pg revision for caching
|
||
id: pg_ver
|
||
run: echo ::set-output name=pg_rev::$(git rev-parse HEAD:vendor/postgres)
|
||
|
||
- name: Cache postgres build
|
||
id: cache_pg
|
||
uses: actions/cache@v2
|
||
with:
|
||
path: |
|
||
tmp_install/
|
||
key: ${{ runner.os }}-pg-${{ steps.pg_ver.outputs.pg_rev }}
|
||
|
||
- name: Build postgres
|
||
if: steps.cache_pg.outputs.cache-hit != 'true'
|
||
run: |
|
||
./pgbuild.sh
|
||
|
||
- name: Install rust
|
||
run: |
|
||
sudo apt install -y cargo
|
||
|
||
- name: Cache cargo deps
|
||
id: cache_cargo
|
||
uses: actions/cache@v2
|
||
with:
|
||
path: |
|
||
~/.cargo/registry
|
||
~/.cargo/git
|
||
target
|
||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||
|
||
- name: Build
|
||
run: |
|
||
cargo build
|
||
|
||
- name: Run test
|
||
run: |
|
||
cargo test --test test_pageserver -- --nocapture --test-threads=1
|