diff --git a/.github/workflows/ai.yml b/.github/workflows/ai.yml new file mode 100644 index 0000000..7a77237 --- /dev/null +++ b/.github/workflows/ai.yml @@ -0,0 +1,55 @@ +name: AI + +# Scheduled Claude jobs from ucgmsim/meta-ci-action: file vetted issues, fix the +# ones a maintainer labels `ai-ok`, and add tests for poorly covered code. The +# times are ~02:17 in Auckland; the crons are UTC. +on: + schedule: + - cron: "17 13 * * 6" # Sundays: issue generator + - cron: "17 13 * * 2" # Wednesdays: issue solver and test improver + workflow_dispatch: + inputs: + run: + description: "Which job to run now" + type: choice + options: [issue-generator, issue-solver, test-improver] + issue: + description: "issue-solver: try this issue regardless of its labels (0: the oldest ai-ok issues)" + type: number + default: 0 + +permissions: + contents: read + issues: write + pull-requests: write + id-token: write # for the Claude GitHub App + +jobs: + issue-generator: + if: github.event.schedule == '17 13 * * 6' || inputs.run == 'issue-generator' + uses: ucgmsim/meta-ci-action/.github/workflows/ai-issue-generator.yml@v2 + secrets: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + with: + system-packages: "gmt libgmt-dev ghostscript gdal-bin libgdal-dev" + uv-extra-args: "--all-groups --all-extras" + + issue-solver: + if: github.event.schedule == '17 13 * * 2' || inputs.run == 'issue-solver' + uses: ucgmsim/meta-ci-action/.github/workflows/ai-issue-solver.yml@v2 + secrets: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + with: + issue: ${{ inputs.issue || 0 }} + system-packages: "gmt libgmt-dev ghostscript gdal-bin libgdal-dev" + uv-extra-args: "--all-groups --all-extras" + + test-improver: + if: github.event.schedule == '17 13 * * 2' || inputs.run == 'test-improver' + uses: ucgmsim/meta-ci-action/.github/workflows/ai-test-improver.yml@v2 + secrets: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + with: + cov-package: source_modelling + system-packages: "gmt libgmt-dev ghostscript gdal-bin libgdal-dev" + uv-extra-args: "--all-groups --all-extras"