# How to test with the latest Virtualmin code from Git? (CI)

**URL:** <https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592>\
**Category:** Developers\
**Created:** [September 15, 2023, 5:55am UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592 "2023-09-15T05:55:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![marclaporte](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/marclaporte/32/1518_2.png) [@marclaporte](https://forum.virtualmin.com/u/marclaporte)\
**Post date:** [September 15, 2023, 5:55am UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/1 "2023-09-15T05:55:40Z")

</div>

There is a lag between development on

- [https://github.com/virtualmin/virtualmin-gpl/commits/master](https://github.com/virtualmin/virtualmin-gpl/commits/master)
- [https://github.com/virtualmin/Virtualmin-Config/commits/master](https://github.com/virtualmin/Virtualmin-Config/commits/master)

And what is released

- [https://software.virtualmin.com/vm/7/gpl/apt/pool/main/w/webmin-virtual-server/](https://software.virtualmin.com/vm/7/gpl/apt/pool/main/w/webmin-virtual-server/)
- [https://software.virtualmin.com/vm/7/gpl/apt/pool/main/v/virtualmin-config/](https://software.virtualmin.com/vm/7/gpl/apt/pool/main/v/virtualmin-config/)

This is explained here: [https://github.com/virtualmin/virtualmin-gpl/issues/599](https://github.com/virtualmin/virtualmin-gpl/issues/599) and it makes sense.

I would like my team to participate more to the development process. Testing and fixing bugs at first, and hopefully soon after, adding features and improving the UI. To make progress on this goal, I would like to set up some test servers that use the latest code from Git. This would not be for production projects, but for experiments. Are there repos that have this latest code already?

Similarly, I would like to automate testing for [WikiSuite](https://gitlab.com/wikisuite/wikisuite-packages) (which leverages the Virtualmin installer at [https://software.virtualmin.com/gpl/scripts/install.sh](https://software.virtualmin.com/gpl/scripts/install.sh))

Is there a testing suite for Virtualmin? I would like to run it periodically on various distros to make sure all is still working.

[https://github.com/virtualmin/virtualmin-install/commits/master/virtualmin-install.sh](https://github.com/virtualmin/virtualmin-install/commits/master/virtualmin-install.sh) is at 7.1.2 but [https://software.virtualmin.com/gpl/scripts/install.sh](https://software.virtualmin.com/gpl/scripts/install.sh) is at 7.1.0 and it would be great to detect issues before the code hits the main repos.

Thanks!

---

<div class="post-metadata">

**Author:** ![tpnsolutions](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/tpnsolutions/32/69_2.png) [@tpnsolutions](https://forum.virtualmin.com/u/tpnsolutions)\
**Post date:** [September 16, 2023, 3:56pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/2 "2023-09-16T15:56:32Z")

</div>

@marclaporte,

If you are serious about helping out, first off that’s awesome!

Next, let me tag this with [@staff](https://forum.virtualmin.com/groups/staff) so it gets viewed by one of the core developers who can most definitely give you the info you’re looking for.

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [September 16, 2023, 4:44pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/3 "2023-09-16T16:44:17Z")

</div>

> How to test with the latest Virtualmin code from Git? (Continuous integration)

@marclaporte I have recently made it possible for Webmin, Usermin and Authentic Theme repos using GitHub Actions, i.e. we now build nightly versions of Webmin and Usermin packages with all the latest changes to [builds.webmin.dev](https://builds.webmin.dev). It happens every day at night or on specific commit message, i.e. commit message that contains `[build]` label.

For Virtualmin, Joe was going to make it possible in the future.

However, a long time ago, for my own use I created a Bash sync script, which looks into my local **`/etc/hosts`** file, and syncs automatically to all virtual machines (usually local, which names start with **`debug-`** ), a file that was just saved, or the whole project using my IDE, e.g.:

 ![image](https://forum.virtualmin.com/uploads/default/original/2X/3/3b26a00ca48a17e81fd8c201fc0408b52c9df761.png)

It is not a problem for me. I can test code on the fly on any Linux OS variant and version in no time. Nevertheless, this is a good option for me, as a developer, and for CI we need the same approach for Virtualmin GPL and Pro packages, i.e. to use GitHub Actions.

---

<div class="post-metadata">

**Author:** ![Jamie](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jamie/32/8589_2.png) [@Jamie](https://forum.virtualmin.com/u/Jamie)\
**Post date:** [September 16, 2023, 4:46pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/4 "2023-09-16T16:46:57Z")

</div>

So there is a testing suite - you can run `virtualmin functional-test` to run all the tests locally. The coverage isn’t complete for all functionality, but it’s very good for the API.

That said, you should be careful running the latest checked-in code on a production system, as it may be in an incomplete state that could break existing sites. We don’t generally run all tests until release time…

---

<div class="post-metadata">

**Author:** ![marclaporte](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/marclaporte/32/1518_2.png) [@marclaporte](https://forum.virtualmin.com/u/marclaporte)\
**Post date:** [September 16, 2023, 4:53pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/5 "2023-09-16T16:53:16Z")

</div>

This is beautiful:

- [https://github.com/webmin/webmin/actions/workflows/webmin.dev-deploy-webmin-package.yml](https://github.com/webmin/webmin/actions/workflows/webmin.dev-deploy-webmin-package.yml)
- [https://github.com/webmin/usermin/actions/workflows/webmin.dev-deploy-usermin-package.yml](https://github.com/webmin/usermin/actions/workflows/webmin.dev-deploy-usermin-package.yml)
- [https://github.com/webmin/authentic-theme/actions/workflows/webmin.dev-deploy-webmin-and-usermin-packages.yml](https://github.com/webmin/authentic-theme/actions/workflows/webmin.dev-deploy-webmin-and-usermin-packages.yml)

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [September 16, 2023, 4:57pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/6 "2023-09-16T16:57:27Z")

</div>

> [@Jamie](#):
>
> That said, you should be careful running the latest checked-in code on a production system, as it may be in an incomplete state that could break existing sites. We don’t generally run all tests until release time.

I think this is the purpose of development (nightly) builds. Even though, I like the idea of having an ability for a user to get a working preview, like in case of Webmin and Usermin nightly packages, it’s important to remember that a nightly build can contain bugs. What I’m afraid of, is that some users will use it in production and then complain.

> There is a testing suite - you can run `virtualmin functional-test` to run all the tests

While this is great for pre-production package, for a nightly it would be an over kill. I think for a nightly it would be enough just to test for syntax errors.

@Jamie, how about we create a new patch sub command for `webmin` command to easily apply the patch? For example, something like:

```plaintext
webmin patch virtual-server 5f607e108aa7d65ed5200e451b.patch

```

or

```plaintext
webmin patch apache 8211f7abf9a5cab4d560b288c0.patch

```

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [September 16, 2023, 4:59pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/7 "2023-09-16T16:59:57Z")

</div>

> [@marclaporte](#):
>
> This is beautiful:
> 
> - [webmin.dev: Deploy Webmin package · Workflow runs · webmin/webmin · GitHub](https://github.com/webmin/webmin/actions/workflows/webmin.dev-deploy-webmin-package.yml)
> - [webmin.dev: Deploy Usermin package · Workflow runs · webmin/usermin · GitHub](https://github.com/webmin/usermin/actions/workflows/webmin.dev-deploy-usermin-package.yml)
> - [webmin.dev: Deploy Webmin and Usermin packages · Workflow runs · webmin/authentic-theme · GitHub](https://github.com/webmin/authentic-theme/actions/workflows/webmin.dev-deploy-webmin-and-usermin-packages.yml)

Yeah, at some point I realized that it would be better for all to have those built automatically. The only downside is initial setup, as it took me some time to adjust my build scripts and properly configure **`webmin.dev`** instance to protect the signing key when used with GitHub Actions.

---

<div class="post-metadata">

**Author:** ![marclaporte](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/marclaporte/32/1518_2.png) [@marclaporte](https://forum.virtualmin.com/u/marclaporte)\
**Post date:** [September 16, 2023, 5:08pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/8 "2023-09-16T17:08:32Z")

</div>

On a fresh install of Virtualmin:  
root@:/# virtualmin functional-test  
Command functional-test.pl was not found

> [@Jamie](#):
>
> you should be careful running the latest checked-in code on a production system, as it may be in an incomplete state that could break existing sites

Agreed. It will be for experiments, and once we feel more proficient, we can use for low volume development servers.

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [September 16, 2023, 5:16pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/9 "2023-09-16T17:16:56Z")

</div>

> [@marclaporte](#):
>
> root@:/# virtualmin functional-test  
> Command functional-test.pl was not found

I think you could just go:

```auto
/usr/share/webmin/virtual-server/functional-test.pl

```

---

<div class="post-metadata">

**Author:** ![marclaporte](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/marclaporte/32/1518_2.png) [@marclaporte](https://forum.virtualmin.com/u/marclaporte)\
**Post date:** [September 16, 2023, 5:17pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/10 "2023-09-16T17:17:48Z")

</div>

> [@Ilia](#):
>
> how about we create a new patch sub command

This would be really nice.

We [implemented a patching mechanism like this for Tiki Manager](https://doc.tiki.org/Manager#instance:patch) and it’s very helpful for [advanced testers like nekohayo](https://github.com/virtualmin/virtualmin-gpl/issues/created_by/nekohayo) to confirm fixes before the releases. But it can get messy when multiple patches are applied, so I wouldn’t recommend for long-term patch management.

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [September 16, 2023, 5:19pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/11 "2023-09-16T17:19:18Z")

</div>

> [@Ilia](#):
>
> > [@marclaporte](#):
> >
> > root@:/# virtualmin functional-test  
> > Command functional-test.pl was not found
> 
> I think you could just go:
> 
> ```auto
> /usr/share/webmin/virtual-server/functional-test.pl
> 
> ```

Although, **`virtualmin functional-test`** works for me just fine too!

---

<div class="post-metadata">

**Author:** ![marclaporte](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/marclaporte/32/1518_2.png) [@marclaporte](https://forum.virtualmin.com/u/marclaporte)\
**Post date:** [September 16, 2023, 5:22pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/12 "2023-09-16T17:22:53Z")

</div>

Weird that I don’t have it

> [@Ilia](#):
>
> `/usr/share/webmin/virtual-server/functional-test.pl`

 ![image](https://forum.virtualmin.com/uploads/default/original/2X/6/64208d03296e0bd374cda7de2ab17f05b6487923.jpeg)

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [September 16, 2023, 5:23pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/13 "2023-09-16T17:23:38Z")

</div>

> [@marclaporte](#):
>
> We [implemented a patching mechanism like this for Tiki Manager](https://doc.tiki.org/Manager#instance:patch) and it’s very helpful for [advanced testers like nekohayo](https://github.com/virtualmin/virtualmin-gpl/issues/created_by/nekohayo) to confirm fixes before the releases. But it can get messy when multiple patches are applied, so I wouldn’t recommend for long-term patch management.

Yeah, it’s always easier just to `apt-get update && apt-get upgrade -y`.

Also, I could do CI for Virtualmin, if Joe gives me the green light .. because I remember Joe wanted to make GitHub Actions work for Virtualmin on his own.

I also have **`virtualmin.dev`** so we could replicate **`software.virtualmin.com`** on **`download.virtualmin.dev`**..

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [September 16, 2023, 5:24pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/14 "2023-09-16T17:24:18Z")

</div>

> [@marclaporte](#):
>
> Weird that I don’t have it
> 
> > [@Ilia](#):
> >
> > `/usr/share/webmin/virtual-server/functional-test.pl`

Well, apparently that library file isn’t included to the production package.

---

<div class="post-metadata">

**Author:** ![Jamie](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jamie/32/8589_2.png) [@Jamie](https://forum.virtualmin.com/u/Jamie)\
**Post date:** [September 16, 2023, 7:21pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/15 "2023-09-16T19:21:22Z")

</div>

> [@Ilia](#):
>
> Well, apparently that library file isn’t included to the production package.

Yeah, but it should be in the git repository. Be aware though that it makes a LOT of assumptions about the environment and the existence of test data files for validating that cpanel/etc migrations work.

---

<div class="post-metadata">

**Author:** ![marclaporte](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/marclaporte/32/1518_2.png) [@marclaporte](https://forum.virtualmin.com/u/marclaporte)\
**Post date:** [October 7, 2023, 4:37am UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/16 "2023-10-07T04:37:00Z")

</div>

“This set of changes (…) makes any merge to the `master` branch build `devel` packages and publish them to the new devel repository.” Source:  
[https://github.com/virtualmin/webmin-jailkit/pull/7](https://github.com/virtualmin/webmin-jailkit/pull/7)

More relevant info:  
[https://github.com/virtualmin/webmin-jailkit/pull/10](https://github.com/virtualmin/webmin-jailkit/pull/10)

We see some test examples here: [https://software.virtualmin.com/vm/7/gpl-devel/rpm/noarch/](https://software.virtualmin.com/vm/7/gpl-devel/rpm/noarch/)

This is very exciting!

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [October 7, 2023, 6:05am UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/17 "2023-10-07T06:05:05Z")

</div>

I’ll try to get more modules building automatically via Github Actions this weekend. I ran into some issues where the old repos were getting broken by automated updates, so I rolled it back until I could spend some time figuring out what was going wrong. The publishing scripts for old repos are kinda messy and happen in two places (on the build server and on the actual web server hosting the repos, for historic reasons).

---

<div class="post-metadata">

**Author:** ![verne](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/v/dbc845/32.png) [@verne](https://forum.virtualmin.com/u/verne)\
**Post date:** [October 21, 2023, 3:47am UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/18 "2023-10-21T03:47:40Z")

</div>

question – for general testing of the virtualmin devel code, can I simply download the zipped code tree (using the green CODE button) from [GitHub - virtualmin/virtualmin-gpl: Virtualmin web hosting control panel for Webmin](https://github.com/virtualmin/virtualmin-gpl/tree/master) and then unzip it inside of an existing `/usr/libexec/webmin/virtual-server/` directory on my Redhat server? Perhaps erasing all contents of `/virtual-server/` first? I was not sure if the typical Virtualmin installation or upgrade was simply that, and was fully contained to that subdirectory tree.

I am interested in seeing if some recent commits will fix some issues that have been bugging me 😄

Naturally it would be a bad idea to do this on a production server; I would use a test server for this activity.

Or are there devel RPMs someplace that I can pull down and install for testing?

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [October 21, 2023, 5:21pm UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/19 "2023-10-21T17:21:39Z")

</div>

You’d need to update the Perl path in all the files that have a Perl shebang (or make a link from `/usr/local/bin/perl` to the location of your actual Perl, which is usually `/usr/bin/perl`).

There are no devel RPMs currently being auto-produced, but there will be kinda sorta soon (maybe a month or three).

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [October 22, 2023, 9:25am UTC](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592/20 "2023-10-22T09:25:39Z")

</div>

I always setup my development environments without updating the shebang. Instead, I just created a symbolic link:

```auto
ln -s /usr/bin/perl /usr/local/bin/perl

```

[Next page](https://forum.virtualmin.com/t/how-to-test-with-the-latest-virtualmin-code-from-git-ci/122592.md?page=2)
