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

Improve Automatic Tests for CI on alpine-php-webserver Using GitHub Actions #35

Open
5 tasks
erseco opened this issue Nov 22, 2024 · 0 comments
Open
5 tasks
Assignees

Comments

@erseco
Copy link
Owner

erseco commented Nov 22, 2024

The current setup for Continuous Integration (CI) in the alpine-php-webserver repository could be enhanced to provide more robust and comprehensive automated testing for the Docker image. Improving the testing process will help ensure higher reliability and prevent regressions when introducing new features or updates.


Proposed Improvements

  1. Add Multi-Platform Build and Tests:

    • Ensure the image is tested on multiple architectures (amd64, arm64, etc.) using Docker Buildx.
    • Validate compatibility and functionality across platforms.
  2. Lint Dockerfile and Shell Scripts:

  3. Run Containerized Tests:

    • Test the Docker image by running it and executing basic PHP scripts.
    • Verify Nginx and PHP-FPM functionality by simulating web requests using tools like curl or PHPUnit tests for web servers.
  4. Check for Vulnerabilities:

  5. Cache Optimization:

    • Implement caching strategies for Docker layers and Composer dependencies during the CI process to speed up builds.
  6. Automate Publishing on Successful Tests:

    • Automatically publish the Docker image to the registry only if all tests pass and on specific triggers (e.g., tags or branches like main).

Acceptance Criteria

  • CI workflow runs tests for multi-platform builds and passes without errors.
  • Dockerfile and scripts are linted during the CI workflow.
  • Tests verify PHP and Nginx configurations work as expected.
  • Vulnerability scan integrates into the CI pipeline with clear reporting.
  • Workflow outputs are clear and informative for debugging.

Additional Context

Implementing these improvements will align the repository with modern CI/CD practices and increase confidence in the image's stability and security. It also provides contributors with immediate feedback on their changes.

@erseco erseco self-assigned this Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant