Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Add direct points input #248

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

markpatterson27
Copy link
Contributor

Add action inputs for points and availablePoints that bypasses grading tests and goes direct to check run to report grading score back to the GH Classroom interface.

There are use-cases where doing grading tests and calculating final score is easier to do outside of autograding. By providing points inputs, these workflows can be supported without having to maintain 2 separate equivalents of setCheckRunOutput.

See:

Usage

Inputs are optional. Without both points and available-points being provided, autograding will run grading tests as normal. If both inputs are provided, autograding tests are skipped and setCheckRunOutput is run with the provided inputs.

Example usage:

...
      - name: run grading
        id: grading
        run: |
          <command to run unit tests with grading output>
          echo "points=$calc_points" >> $GITHUB_OUTPUT
          echo "total-points=$calc_total_points" >> $GITHUB_OUTPUT

      - uses: education/autograding@master
        with:
          points: ${{ steps.grading.outputs.points }}
          available-points: ${{ steps.grading.outputs.total-points }}

If anyone wants to try it out, I have a build on my fork on the dev-points-input-release branch (replace education/autograding@master with markpatterson27/autograding@dev-points-input-release)

ToDo

  • add jest tests

@markpatterson27 markpatterson27 requested a review from a team as a code owner December 4, 2023 11:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant