nlmod icon indicating copy to clipboard operation
nlmod copied to clipboard

Make tests faster (i.a. using fixtures)

Open dbrakenhoff opened this issue 4 years ago • 4 comments

hopefully make testing a bit more efficient?

dbrakenhoff avatar Aug 17 '21 14:08 dbrakenhoff

I think what would also help is to create a logical pipeline for the tests. This might save time by making the tests more specific, using workflows that are dependent on one another.

https://github.blog/enterprise-software/ci-cd/build-ci-cd-pipeline-github-actions-four-steps/

martinvonk avatar Nov 06 '24 13:11 martinvonk

Something like this should work I think:

name: Test Pipeline

on: [push, pull_request]
runs-on: ubuntu-latest

jobs:
  ahn:
    steps:
      - name: ahn
        run: |
          tox -e ahn
  tno:
    steps:
      - name: ahn
        run: |
          tox -e regis
          tox -e geotop

  jarkus:
    steps:
      - name: jarkus
        run: |
          tox -e jarkus

  bgt:
    steps:
      - name: bgt
        run: |
          tox -e bgt

  base_model:
    needs: [ahn, tno, jarkus, bgt]
    steps:
      - name: base_model
        run: |
          tox -e base_model

  grid_refine:
    needs: [base_model]
    steps:
      - name: grid_refine
        run: |
          tox -e grid_refine

  uzf:
    needs: [base_model]
    steps:
      - name: uzf
        run: |
          tox -e uzf

  modpath:
    needs: [base_model]
    steps:
      - name: modpath
        run: |
          tox -e modpath


martinvonk avatar Nov 07 '24 14:11 martinvonk

Is data stored between steps when you implement the CI this? I assume so, but I haven't checked. Do you know?

dbrakenhoff avatar Nov 07 '24 15:11 dbrakenhoff

Yes. Should be possible. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow

martinvonk avatar Nov 07 '24 15:11 martinvonk