Reflect pgstat_fetch_stat_beentry() rename #159
Workflow file for this run
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: ubuntu | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
env: | |
PG: ${{ matrix.postgres-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- postgres-version: '9.3' | |
os: ubuntu-22.04 | |
- postgres-version: '9.4' | |
os: ubuntu-20.04 | |
- postgres-version: '9.5' | |
os: ubuntu-22.04 | |
- postgres-version: '9.6' | |
os: ubuntu-20.04 | |
- postgres-version: '10' | |
os: ubuntu-22.04 | |
- postgres-version: '11' | |
os: ubuntu-20.04 | |
- postgres-version: '12' | |
os: ubuntu-22.04 | |
- postgres-version: '13' | |
os: ubuntu-20.04 | |
- postgres-version: '14' | |
os: ubuntu-22.04 | |
- postgres-version: '15' | |
os: ubuntu-20.04 | |
- postgres-version: '16' | |
os: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up packages | |
run: | | |
set -e | |
sudo apt-get update | |
sudo apt-get install curl ca-certificates gnupg | |
sudo sh -c "echo \"deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main $PG\" > /etc/apt/sources.list.d/pgdg.list" | |
sudo sh -c "curl -s -o - https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg" | |
sudo apt-get update | |
sudo apt-get install -yq --no-install-suggests --no-install-recommends curl postgresql-common lcov libevent-dev pv brotli libbrotli1 libbrotli-dev | |
# forbid creation of a main cluster when package is installed | |
sudo sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf | |
sudo apt-get install -yq --no-install-suggests --no-install-recommends postgresql-$PG postgresql-server-dev-$PG | |
- name: Download noisia | |
run: | | |
VERSION=0.1.1 | |
curl -sL https://github.com/lesovsky/noisia/releases/download/v$VERSION/noisia_${VERSION}_linux_amd64.tar.gz | tar xzv noisia | |
- name: Compile and install bg_mon | |
run: | | |
set -e | |
sudo make PG_CONFIG=/usr/lib/postgresql/$PG/bin/pg_config USE_PGXS=1 ENABLE_GCOV=1 install | |
sudo make PG_CONFIG=/usr/lib/postgresql/$PG/bin/pg_config USE_PGXS=1 ENABLE_GCOV=1 with_llvm=no clean all install | |
- name: Run tests | |
run: | | |
PATH=/usr/lib/postgresql/$PG/bin:$PATH bash -x test.sh | |
if grep -E '(ERROR|FATAL)' test_cluster?/pg_log/postgresql.log | grep -Ev '(no COPY in progress|could not connect to|could not send|the database system is not yet accepting connections|database system is shutting|error reading result of streaming command|database system is starting up|log:noisia|terminating connection due to administrator command)'; then exit 1; fi | |
- name: Generate lcov.info | |
run: | | |
gcov -lr *.[ch] | |
lcov --capture --directory . --no-external -o lcov.info | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@master | |
with: | |
path-to-lcov: lcov.info | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: ${{ matrix.postgres-version }} | |
parallel: true | |
finish: | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |