Skip to content

Commit

Permalink
feat: add GitHub Actions workflow for Docker tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Dec 29, 2024
1 parent da04e57 commit 62bdfd6
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/docker_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docker Tests

on: [push]

jobs:
docker-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and test Debian container
run: |
docker compose build debian
docker compose run debian pytest tests
- name: Build and test Ubuntu container
run: |
docker compose build ubuntu
docker compose run ubuntu pytest tests
# Windows container tests are commented out until Windows container support is fully implemented
#- name: Build and test Windows container
# run: |
# docker compose build windows
# docker compose run windows pytest tests
2 changes: 1 addition & 1 deletion src/python_compile/assets/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ else
echo "Did not find any .whl files in root directory"
fi

python3 -m nuitka --standalone --follow-imports --onefile --lto=yes --python-flag=-OO /host_dir/"$@"
python3 -m nuitka --assume-yes-for-downloads --standalone --follow-imports --onefile --lto=yes --python-flag=-OO /host_dir/"$@"
for file in $(find . -maxdepth 1 -type f -name "*.bin"); do chmod +x "$file"; done
for file in $(find . -maxdepth 1 -type f -name "*.bin"); do gzip "$file"; done

Expand Down
1 change: 1 addition & 0 deletions src/python_compile/native_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def generate_cmd_list(app_py: Path) -> list[str]:
"""Generate the command list."""
head_cmd_list = ["python", "-m", "nuitka"]
body_cmd_list = [
"--assume-yes-for-downloads",
"--standalone",
"--follow-imports",
"--onefile",
Expand Down

0 comments on commit 62bdfd6

Please sign in to comment.