ACCESS-NRI / access-nri-intake-catalog

Tools and configuration info used to manage ACCESS-NRI's intake catalogue
https://access-nri-intake-catalog.rtfd.io
Apache License 2.0
8 stars 1 forks source link

153-End to End build test. #266

Open charles-turner-1 opened 2 days ago

charles-turner-1 commented 2 days ago

Closes #153.

This contains an end to end build test, where a subset of the catalog is built, and queries executed against it.

@rbeucher can you link me to the Gadi SSH workflows you showed me the other day & I'll create a trigger for this based off those.

codecov[bot] commented 2 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.89%. Comparing base (008b280) to head (5071f0b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #266 +/- ## ======================================= Coverage 97.89% 97.89% ======================================= Files 11 11 Lines 807 809 +2 ======================================= + Hits 790 792 +2 Misses 17 17 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

marc-white commented 1 day ago

A couple of other things:

rbeucher commented 1 day ago

Hi @charles-turner-1,

Regarding the Gadi deployment actions, the workflow file can be found here.

This workflow triggers the build.sh PBS script located in the admin/access-nri-intake-catalog/bin folder.

I’ve deployed the current main branch to the conda/access-med-0.10 environment. Fingers crossed, it works as expected!

rbeucher commented 1 day ago

Just tested with a subset that only includes CMIP5 and it worked fine: https://github.com/ACCESS-NRI/access-nri-intake-catalog/actions/runs/11945531317 We should have a way to trigger a build test from GitHub.

charles-turner-1 commented 1 day ago

A couple of other things:

  • I presume the e2e directory is outside the tests directory so that it can have a separate conftest.py. However, I think that should still work as expected if e2e is a subdirectory of tests. If that's not the case, could e2e be renamed to something like tests_e2e so we have better visibility that it's a test suite, not code?
  • I think it would be nice if the standard pytest call doesn't try to execute the E2E tests. I think there's ways that a skipif can be used to make this happen, e.g.: https://stackoverflow.com/questions/33084190/default-skip-test-unless-command-line-parameter-present-in-py-test

I virtually always run pytest using pytest tests - hence sticking it in a separate E2E folder & adding that to the .github_worfkows/ci.yml. Funnily enough, I originally called it e2e, not test_e2e or similar to avoid pytest discovering & running it erroneously. Obviously, that didn't work (see 1.)

I think both your suggestions would make this much cleaner.

charles-turner-1 commented 15 hours ago

I've done a bit more looking to this - frustratingly, looks like there might be some complications into the pytest skipif decorator not working on fixtures. Hopefully this should have little/no impact, but it's gonna take a touch more digging to make sure we can merge the confests & not cause any issues.