Skip to content

Set up GitHub Actions CI workflow with Elixir testing best practices#9

Merged
cpursley merged 3 commits into
mainfrom
copilot/fix-8
Jul 19, 2025
Merged

Set up GitHub Actions CI workflow with Elixir testing best practices#9
cpursley merged 3 commits into
mainfrom
copilot/fix-8

Conversation

Copilot AI commented Jul 19, 2025

Copy link
Copy Markdown
Contributor

This PR adds comprehensive GitHub Actions CI/CD workflows for the html2markdown project, following Elixir testing best practices for ecto-less projects.

Changes Made

🚀 Main CI Workflow (.github/workflows/ci.yml)

  • Multi-version testing matrix: Tests across Elixir 1.15-1.17 and OTP 25-27 combinations
  • Dependency caching: Optimized build times with proper Mix dependency and build caching
  • Code quality enforcement:
    • Formatter checks (mix format --check-formatted)
    • Linting with Credo (mix credo --only warning)
    • Security analysis with Sobelow (mix sobelow --config)
  • Comprehensive testing: Separate jobs for testing, coverage, and quality checks
  • Coverage reporting: Generates HTML coverage reports and uploads as artifacts

⚡ Quick Test Workflow (.github/workflows/quick-test.yml)

  • Manual trigger capability for development testing
  • Weekly scheduled runs to catch dependency issues
  • Focused on latest Elixir/OTP versions for fast feedback

🔧 Configuration Files

  • .sobelow-conf: Security scanning configuration optimized for library projects
  • README.md updates:
    • Added CI status badge
    • Added development section with testing and quality check commands
    • Documented the CI/CD setup

📊 Quality Assurance Features

  • Matrix testing: Ensures compatibility across supported Elixir/OTP versions
  • Security permissions: Follows GitHub security best practices with minimal required permissions
  • Artifact management: Coverage reports are uploaded and retained for 30 days
  • Integration with existing tooling: Uses the project's existing mix quality alias

Example Usage

# Run the same checks locally that CI runs
mix quality              # All quality checks
mix test                 # Run tests
mix coveralls.html       # Generate coverage report

The workflows will automatically run on:

  • All pushes to main/master branches
  • All pull requests
  • Manual triggers (quick-test workflow)
  • Weekly schedule (quick-test workflow)

Fixes #8.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)
  • repo.hex.pm
    • Triggering command: /usr/lib/erlang/erts-13.2.2.5/bin/inet_gethost 4 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits July 19, 2025 22:03
Co-authored-by: cpursley <1223773+cpursley@users.noreply.github.com>
…issions

Co-authored-by: cpursley <1223773+cpursley@users.noreply.github.com>
Copilot AI changed the title [WIP] Set up github test runner Set up GitHub Actions CI workflow with Elixir testing best practices Jul 19, 2025
Copilot AI requested a review from cpursley July 19, 2025 22:07
@cpursley cpursley marked this pull request as ready for review July 19, 2025 23:06
@cpursley cpursley merged commit 1663f9b into main Jul 19, 2025
2 of 18 checks passed
@cpursley cpursley deleted the copilot/fix-8 branch July 19, 2025 23:06
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

Successfully merging this pull request may close these issues.

Set up github test runner

2 participants