Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Linux Tests on Travis to Tests on Github Actions #83

Closed
AndreMikulec opened this issue Mar 20, 2021 · 2 comments · Fixed by #85
Closed

Convert Linux Tests on Travis to Tests on Github Actions #83

AndreMikulec opened this issue Mar 20, 2021 · 2 comments · Fixed by #85

Comments

@AndreMikulec
Copy link
Collaborator

Dave Cramer,

I am receiving this message everytime, that I login to Travis (https://travis-ci.org/).

Please be aware travis-ci.org will be shutting down in several weeks, 
with all accounts migrating to travis-ci.com. Please stay tuned here for more information.

I am aware that plr uses Travis to "test a build".

Perhaps, plr can also use another CI to also "test a build", for example, in the case that Travis actually, does stop serving open source projects.

One possible CI, is Github Actions.

@AndreMikulec
Copy link
Collaborator Author

Dave Cramer,

I read the Travis file travis.yml, and based on what I read, I made a Github Actions file .github/workflows/build.yml. Using the new build.yml file and Github Actions, I successfully built and tested plr with versions of PostgreSQL from 9.5 through 13.

In the file ".github/workflows/build.yml" only some minor changes were done.

  1. Changed
    setfacl -Rm u:postgres:rwx,d:u:travis:rwx $HOME
    to
    sudo setfacl -Rm u:postgres:rwx,d:u:runner:rwx /home/runner

In Travis, the build-test runs under "travis".
In Github Actions, the build-test runs under "runner".

In Travis, $HOME may be volatile.
In Github Actions, $HOME is static at /home/runner.

In Travis, to use "setfacl", elevated privileges are not needed.
In Github Actions, to use "setfacl", elevated priviledges are needed.

  1. Changed
sudo make install

to

sudo USE_PGXS=1 make install

In Travis, the first former case works.
In Github Actions, the former case does not work; I received errors.
To make the build-test work, I used "USE_PGXS=1".

Changed
single-line commands
into
multi-line commands

This was not required. This minimized the number of processes. It looks cleaner.

Here is the commit
AndreMikulec@9da5156
in branch
https://github.com/AndreMikulec/plr/tree/83_Convert_Linux_Tests_on_Travis_to_Tests_on_Github_Actions

Here is the build result.
https://github.com/AndreMikulec/plr/actions/runs/669678071

Here is the PostgreSQL 13 run result.
https://github.com/AndreMikulec/plr/runs/2153212316?check_suite_focus=true

What do you think?

Do you think that build-tests, using Github Actions, may become a permanent part of "postgres-plr?

@davecramer
Copy link
Collaborator

Well the simplest solution would be to move to travis-ci.com, but I prefer github actions. So I'd be up for this. Can you create a PR for it

AndreMikulec added a commit to AndreMikulec/plr that referenced this issue Mar 25, 2021
A message is received every time, that a login occurs to Travis (https://travis-ci.org/).

```
Please be aware travis-ci.org will be shutting down in several weeks,
with all accounts migrating to travis-ci.com. Please stay tuned here for more information.
I am aware that plr uses Travis to "test a build".
```

plr can also use another CI to also "test a build", for example, in the case that Travis actually, does stop serving open source projects.

To see the "Github Actions" test result, one may navigate to the Github repository web page tab "Actions".

Alternately, one may browse to the page:
https://github.com/postgres-plr/plr/actions

Fixes postgres-plr#83
AndreMikulec added a commit to AndreMikulec/plr that referenced this issue Mar 25, 2021
A message is received every time, that a login occurs to Travis (https://travis-ci.org/).

```
Please be aware travis-ci.org will be shutting down in several weeks,
with all accounts migrating to travis-ci.com. Please stay tuned here for more information.
```
I am aware that plr uses Travis to "test a build".

plr can also use another CI to also "test a build", for example, in the case that Travis actually, does stop serving open source projects.

To see the "Github Actions" test result, one may navigate to the Github repository web page tab "Actions".

Alternately, one may browse to the page:
https://github.com/postgres-plr/plr/actions

Fixes postgres-plr#83
davecramer pushed a commit that referenced this issue Mar 25, 2021
A message is received every time, that a login occurs to Travis (https://travis-ci.org/).

```
Please be aware travis-ci.org will be shutting down in several weeks,
with all accounts migrating to travis-ci.com. Please stay tuned here for more information.
```
I am aware that plr uses Travis to "test a build".

plr can also use another CI to also "test a build", for example, in the case that Travis actually, does stop serving open source projects.

To see the "Github Actions" test result, one may navigate to the Github repository web page tab "Actions".

Alternately, one may browse to the page:
https://github.com/postgres-plr/plr/actions

Fixes #83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants