2020-12-09 22:19:01 +02:00
|
|
|
name: test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- integration
|
|
|
|
- '**-ci'
|
|
|
|
- '**-cig'
|
2020-12-28 15:51:22 +02:00
|
|
|
pull_request:
|
2021-07-09 20:16:10 +02:00
|
|
|
branches:
|
|
|
|
- integration
|
|
|
|
- '**-ci'
|
|
|
|
- '**-cig'
|
2020-12-09 22:19:01 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
# Let all the jobs run to completion even if one fails
|
|
|
|
fail-fast: false
|
|
|
|
|
|
|
|
# The first jobs should be the canaries in the coal mine, i.e. the most likely to fail if there are problems in the code. They
|
|
|
|
# should also be a good mix of unit, integration, and documentation tests.
|
|
|
|
#
|
|
|
|
# In general tests should be ordered from slowest to fastest. This does not make a difference for testing a single commit, but
|
|
|
|
# when multiple commits are being tested it is best to have the slowest jobs first so that as jobs become available they will
|
|
|
|
# tackle the slowest tests first.
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
# All unit (without coverage) and integration tests for 32-bit
|
2021-10-16 18:33:31 +02:00
|
|
|
- param: test --vm=d9 --param=no-performance
|
2020-12-09 22:19:01 +02:00
|
|
|
|
|
|
|
# Debian/Ubuntu documentation
|
|
|
|
- param: doc --vm=u18
|
|
|
|
|
|
|
|
# All integration tests
|
2021-07-18 23:29:20 +02:00
|
|
|
- param: test --vm=u20 --param=build-package --param=module=mock --param=module=real
|
2020-12-09 22:19:01 +02:00
|
|
|
|
|
|
|
# All unit tests (with coverage) on the newest gcc available
|
2021-07-18 23:29:20 +02:00
|
|
|
- param: test --vm=f33 --param=c-only --param=tz=America/New_York
|
2020-12-09 22:19:01 +02:00
|
|
|
|
2021-10-28 21:15:49 +02:00
|
|
|
# RHEL documentation
|
|
|
|
- param: doc --vm=rh8
|
2020-12-09 22:19:01 +02:00
|
|
|
|
|
|
|
# All integration tests
|
2021-10-28 21:15:49 +02:00
|
|
|
- param: test --vm=rh7 --param=module=mock --param=module=real
|
2020-12-09 22:19:01 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: pgbackrest
|
|
|
|
|
|
|
|
- name: Run Test
|
2021-01-04 16:18:17 +02:00
|
|
|
run: cd ${HOME?} && ${GITHUB_WORKSPACE?}/pgbackrest/test/ci.pl ${{matrix.param}} --param=build-max=2
|
2021-07-09 20:16:10 +02:00
|
|
|
|
|
|
|
codeql:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
actions: read
|
|
|
|
contents: read
|
|
|
|
security-events: write
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
language:
|
|
|
|
- cpp
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-07-19 01:02:01 +02:00
|
|
|
- name: Install Packages
|
|
|
|
run: sudo apt-get install -y --no-install-recommends libyaml-dev
|
|
|
|
|
2021-07-09 20:16:10 +02:00
|
|
|
- name: Initialize CodeQL
|
|
|
|
uses: github/codeql-action/init@v1
|
|
|
|
with:
|
|
|
|
languages: ${{matrix.language}}
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: ${GITHUB_WORKSPACE?}/src/configure && make -j 2
|
|
|
|
|
|
|
|
- name: Perform CodeQL Analysis
|
|
|
|
uses: github/codeql-action/analyze@v1
|