WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Add PR validation for AoC submissions #13

@Kavignon

Description

@Kavignon

I must ensure that all pull requests for AoC challenge solutions follow a consistent format and include the required files. This issue proposes adding a validation step to our CI pipeline that checks for the following.

What I'm thinking about:

  • Branch naming:
    • The branch must follow the format aoc/YYYY_day_*.
  • Required files: For a given day_* challenge, the following files must be included:
    • lib/year2024/day<day_number>.ex (Solution script)
    • test/year2024/day<day_number>_test.exs (Test suite)
    • inputs/2024/day_<day_number>_part_1.txt (Input file, Part 1)
    • inputs/2024/day_<day_number>_part_2.txt (Input file, Part 2)
    • notebooks/2024_day_<day_number>.livemd (Livebook notebook for the day)
    • bench/2024_day_<day_number>_bench.exs (Benchmarks file)
  • Update the master index file for the year (e.g., notebooks/2024_index.livemd).
  • Validation Script:
    • Create a Mix task (mix check_pr) to verify that the required files are present for a given PR.
  • Integration with CI:
    • Add a validate-pr job to the existing GitHub Actions workflow.
  • Ensure that the validation job runs on all PRs targeting main.
  • Failure Criteria:
    • The CI job fails if required files are missing or the branch name does not follow the required format.
    • Provide a clear list of missing files in the CI output.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions