README.md 1.35 KB
Newer Older
Valentin Reis's avatar
Valentin Reis committed
1
#### integration testing
Valentin Reis's avatar
Valentin Reis committed
2

Valentin Reis's avatar
Valentin Reis committed
3
This repository contains integration tests that validate the argo stack.
Valentin Reis's avatar
Valentin Reis committed
4 5 6 7

It leverages the argopkgs repo, but overrides some sources in it with
their master branch counterparts. see file `default.nix` for details.

Valentin Reis's avatar
Valentin Reis committed
8
The real intended usage is to override (some of) the source(s) with WIP
9 10
version(s), as part of development or continuous integration. This
gitlab CI snippets shows how to do this on a nix-enabled runner:
Valentin Reis's avatar
Valentin Reis committed
11

12
``` {.yml}
Valentin Reis's avatar
Valentin Reis committed
13 14 15 16 17 18
integration.test:
  stage: test
  script:
    - BUILD=$PWD
    - git clone https://xgitlab.cels.anl.gov/argo/argotest.git
    - cd argotest
Valentin Reis's avatar
Valentin Reis committed
19 20 21 22 23 24 25 26 27 28
    - nix-shell -A test --run "./argotk.hs helloworld" --arg nrm-src ../.
  artifacts:
    paths:
      - argotest/cmd_err.log
      - argotest/cmd_out.log
      - argotest/daemon_out.log
      - argotest/daemon_out.log
      - argotest/nrm.log
      - argotest/time.log
    expire_in: 1 week
Valentin Reis's avatar
Valentin Reis committed
29 30 31 32 33 34
  except:
    - /^wip\/.*/
    - /^WIP\/.*/
  tags:
    - integration
```
35 36

Standalone usage: example with the nrm source in `../`.
37 38

``` {.bash}
39
nix-shell -A test --arg nrm-src ../nrm
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
nix-shell $ ./argotk.hs --help
```

Output:

``` {.txt}
Usage: argotk.hs COMMAND

Available options:
  COMMAND                  Target for the greeting
  -h,--help                Show this help text

Available commands:
  clean                    
  daemon                   
  helloworld               
56
```