- Notifications
You must be signed in to change notification settings - Fork16
Switch from Travis to GitHub Actions#32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
12 commits Select commitHold shift + click to select a range
b8a3eed
Switch from Travis to GitHub Actions
postgres-dev7bb1c9d
Typo
postgres-dev3a41656
Continue on error only for experimental jobs
postgres-dev1577a6d
Don't terminate other parallel jobs if some fail
postgres-deve854bf1
Link the status badge to the workflow results
postgres-devde4e659
Merge branch 'master' into github-actions
asavchkovad21a71
Refactor the test workflow
asavchkov182e96a
[no ci] Remove the mentioning of the 16th version
asavchkova7f17a0
Install Postgres from the ptrack Makefile
asavchkovdaae165
Run Python tests in parallel only if pytest-xdist is available
asavchkov2eaf70d
Use the default pg_config location
asavchkov44a437a
Typo
asavchkovFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
94 changes: 94 additions & 0 deletions.github/workflows/test.yml
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
branches: | ||
- main | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
jobs: | ||
Test: | ||
strategy: | ||
matrix: | ||
# pg_version: [15] | ||
pg_version: [11, 12, 13, 14, 15] | ||
os: [ubuntu-22.04] | ||
# tests: [tap] | ||
tests: [tap, python] | ||
# test_mode: [normal, legacy, paranoia] | ||
test_mode: [normal, paranoia] | ||
exclude: | ||
- tests: tap | ||
test_mode: paranoia | ||
- tests: python | ||
test_mode: normal | ||
- tests: python | ||
test_mode: legacy | ||
fail-fast: false | ||
name: ${{ format('Ptrack ({0}, PostgreSQL {1}, {2} tests, {3} mode)', matrix.os, matrix.pg_version, matrix.tests, matrix.test_mode) }} | ||
container: | ||
image: ${{ format('ghcr.io/postgres-dev/{0}:1.0', matrix.os) }} | ||
env: | ||
PG_BRANCH: ${{ format('REL_{0}_STABLE', matrix.pg_version) }} | ||
PGDATA: $HOME/data | ||
TEST_MODE: ${{ matrix.test_mode }} | ||
options: --privileged | ||
steps: | ||
- name: Get Postgres sources | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: postgres/postgres | ||
ref: ${{ format('REL_{0}_STABLE', matrix.pg_version) }} | ||
path: postgres | ||
- name: Get Ptrack sources | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ptrack | ||
- name: Get Pg_probackup sources | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: postgrespro/pg_probackup | ||
path: pg_probackup | ||
- name: Apply ptrack patches | ||
run: make patch top_builddir=../postgres | ||
working-directory: ptrack | ||
- name: Install Postgres | ||
run: | | ||
make install-postgres top_builddir=$GITHUB_WORKSPACE/postgres prefix=$HOME/pgsql && | ||
echo $HOME/pgsql/bin >> $GITHUB_PATH | ||
working-directory: ptrack | ||
- name: Install Ptrack | ||
run: make install USE_PGXS=1 PG_CPPFLAGS=-coverage SHLIB_LINK=-coverage | ||
working-directory: ptrack | ||
- name: Install Pg_probackup | ||
run: make install-pg-probackup USE_PGXS=1 top_srcdir=../postgres | ||
working-directory: ptrack | ||
shell: bash {0} | ||
- name: Install additional packages | ||
run: | | ||
apt update && | ||
apt install -y python3-pip python3-six python3-pytest python3-pytest-xdist curl && | ||
pip3 install --no-input testgres | ||
# All steps have been so far executed by root but ptrack tests run from an | ||
# unprivileged user so change some permissions | ||
- name: Adjust the permissions of ptrack test folders | ||
run: | | ||
mkdir pg_probackup/tests/tmp_dirs | ||
chown -R "dev:" pg_probackup ptrack | ||
- name: Test | ||
run: make test-${{ matrix.tests }} USE_PGXS=1 | ||
working-directory: ptrack | ||
shell: runuser dev {0} | ||
- name: Collect coverage results | ||
run: make coverage | ||
working-directory: ptrack | ||
shell: runuser dev {0} | ||
- name: Upload coverage results to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
working-directory: ptrack | ||
runs-on: ubuntu-latest |
48 changes: 0 additions & 48 deletions.travis.yml
This file was deleted.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
25 changes: 0 additions & 25 deletionsDockerfile.in
This file was deleted.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
62 changes: 60 additions & 2 deletionsMakefile
This file contains hidden or 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
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.