data-to-insight / csc-validator-be-cin

1 stars 1 forks source link

Workflow checkout branch #466

Closed SLornieCYC closed 9 months ago

SLornieCYC commented 9 months ago

Allow github actions to checkout the branch that it is being run on, instead of main. (Ref discussion in comments on end of #459).

SLornieCYC commented 9 months ago

The linting action now works:

image

File changed

image

The failure

image

image

SLornieCYC commented 9 months ago

The validator_tests action is more problematic.

image

1) Branch checkout is working fine, however:

2) The validator test defaults to rules in the cin2022_23 folder so won't pick up changes to rules in more recent years. (See test 1 which didn't identify the assert).

3) The devcontainers task that runs python -m cin_validator test doesn't return a failure to the action when it finds an assert. (See test 2 which did identify the assert but still reported as a pass when the action completed).

image

SLornieCYC commented 9 months ago

And the tests action has the same issue as validator_tests. The job doesn't return a failure to the action when it finds an assert.

image

tab1tha commented 9 months ago

Thank you for making the change @SLornieCYC and for keeping such a good log of the effects.

I have looked into the second case where the action doesn't fail as expected, though there is clearly a failing test. I do not yet know why that happens.

SLornieCYC commented 9 months ago

Realised that this isn't actually necessary at all (having looked in more detail at the logs in the executed action on other PRs/commits I can see they all show it checking out the correct branch anyway). Therefore closing this PR.

There's potentially still something to resolve around propogating errors up through the action from asserts and the test functions handling multiple years of rules but I need to look into that some more before creating new git issues.