-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] CI: Added tests on OpenBSD & NetBSD
- Loading branch information
1 parent
4e3fb8e
commit dce11cb
Showing
21 changed files
with
361 additions
and
54 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: 'NetBSD VM' | ||
description: 'Install NetBSD VM with python3, PDM and tox pre-installed' | ||
inputs: | ||
python-version: | ||
description: "Version range or exact version of Python to use, using SemVer's version range syntax." | ||
required: true | ||
run: | ||
description: 'The CI command to run' | ||
required: true | ||
release: | ||
description: 'The release version of NetBSD vm' | ||
required: false | ||
envs: | ||
description: 'The envs to pass into NetBSD vm' | ||
required: false | ||
sync: | ||
description: 'How to synchronize the source code to/from the VM, Values can be: rsync(default), and sshfs' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Load PDM configuration from pdm.conf | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: .github/actions/pdm.conf | ||
- name: Load Python configuration | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: ${{ github.action_path }}/python/${{ inputs.python-version }}.conf | ||
- name: Run on VM | ||
uses: vmactions/netbsd-vm@v1 | ||
with: | ||
release: ${{ inputs.release }} | ||
usesh: true | ||
envs: ${{ inputs.envs }} | ||
sync: ${{ inputs.sync }} | ||
prepare: | | ||
set -e | ||
/usr/sbin/pkg_add -v pkgin | ||
pkgin update | ||
pkgin -y install curl git ${{ env.NETBSD_PORTS_FOR_PYTHON }} | ||
curl -sSL https://pdm-project.org/install-pdm.py | ${{ env.NETBSD_PYTHON_BIN }} - --version=${{ env.PDM_VERSION }} --path=/usr/local | ||
pdm config check_update false | ||
pdm config install.cache true | ||
run: | | ||
set -e | ||
pdm install --verbose --frozen-lockfile --global --project=. --no-self --no-default --dev --group=tox | ||
tox --version | ||
${{ inputs.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Use "*" because the name of the python package is something like: | ||
# python311-3.11.?(nb?) | ||
NETBSD_PORTS_FOR_PYTHON="python311-*" | ||
NETBSD_PYTHON_BIN=python3.11 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Use "*" because the name of the python package is something like: | ||
# python312-3.12.?(nb?) | ||
NETBSD_PORTS_FOR_PYTHON="python312-*" | ||
NETBSD_PYTHON_BIN=python3.12 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: 'OpenBSD VM' | ||
description: 'Install OpenBSD VM with python3, PDM and tox pre-installed' | ||
inputs: | ||
python-version: | ||
description: "Version range or exact version of Python to use, using SemVer's version range syntax." | ||
required: true | ||
run: | ||
description: 'The CI command to run' | ||
required: true | ||
release: | ||
description: 'The release version of OpenBSD vm' | ||
required: false | ||
envs: | ||
description: 'The envs to pass into OpenBSD vm' | ||
required: false | ||
sync: | ||
description: 'How to synchronize the source code to/from the VM, Values can be: rsync(default), and sshfs' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Load PDM configuration from pdm.conf | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: .github/actions/pdm.conf | ||
- name: Load Python configuration | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: ${{ github.action_path }}/python/${{ inputs.python-version }}.conf | ||
- name: Run on VM | ||
uses: vmactions/openbsd-vm@v1 | ||
with: | ||
release: ${{ inputs.release }} | ||
usesh: true | ||
envs: ${{ inputs.envs }} | ||
sync: ${{ inputs.sync }} | ||
# FIXME: Cannot install tox on OpenBSD: PDM crashes when installing packages | ||
# c.f. https://github.com/pdm-project/dep-logic/issues/7 | ||
prepare: | | ||
set -e | ||
pkg_add -v -r curl git ${{ env.OPENBSD_PORTS_FOR_PYTHON }} | ||
run: | | ||
set -e | ||
${{ inputs.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
OPENBSD_PORTS_FOR_PYTHON=python | ||
OPENBSD_PYTHON_BIN=python3.11 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This file is @generated by PDM. | ||
# Please do not edit it manually. | ||
|
||
attrs==24.2.0 | ||
cbor2==5.6.5 | ||
cffi==1.17.1 | ||
idna==3.10 | ||
msgpack==1.1.0 | ||
msgpack-types==0.5.0 | ||
mypy==1.13.0 | ||
mypy-extensions==1.0.0 | ||
outcome==1.3.0.post0 | ||
pycparser==2.22 | ||
sniffio==1.3.1 | ||
sortedcontainers==2.4.0 | ||
trio==0.27.0 | ||
typing-extensions==4.12.2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file is @generated by PDM. | ||
# Please do not edit it manually. | ||
|
||
attrs==24.2.0 | ||
cbor2==5.6.5 | ||
cffi==1.17.1 | ||
colorama==0.4.6 | ||
coverage[toml]==7.6.4 | ||
execnet==2.1.1 | ||
idna==3.10 | ||
iniconfig==2.0.0 | ||
msgpack==1.1.0 | ||
outcome==1.3.0.post0 | ||
packaging==24.2 | ||
pluggy==1.5.0 | ||
pycparser==2.22 | ||
pytest==8.3.3 | ||
pytest-asyncio==0.24.0 | ||
pytest-cov==6.0.0 | ||
pytest-mock==3.14.0 | ||
pytest-retry @ git+https://github.com/str0zzapreti/pytest-retry.git@bb465fff6f01f3f90a77229468f7e08a3bdbce20 | ||
pytest-trio==0.8.0 | ||
pytest-xdist==3.6.1 | ||
sniffio==1.3.1 | ||
sortedcontainers==2.4.0 | ||
trio==0.27.0 | ||
trove-classifiers==2024.10.21.16 |
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
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
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
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
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
Oops, something went wrong.