|
| 1 | +{ cfg, pkgs, ... }: |
| 2 | + |
| 3 | +with cfg.steps.commands; |
| 4 | + |
| 5 | +let |
| 6 | + commonAttrs = { |
| 7 | + retry.automatic = true; |
| 8 | + agents.queue = "project42"; |
| 9 | + }; |
| 10 | +in |
| 11 | + |
| 12 | +{ |
| 13 | + steps.commands = { |
| 14 | + compile = commonAttrs // { |
| 15 | + label = "compile everything"; |
| 16 | + command = '' |
| 17 | + nix-shell --run '$SBT compile-all' |
| 18 | + ''; |
| 19 | + }; |
| 20 | + |
| 21 | + style = commonAttrs // { |
| 22 | + dependsOn = [ compile ]; |
| 23 | + label = "scalastyle"; |
| 24 | + command = '' |
| 25 | + nix-shell --run '$SBT scalastyle test:scalastyle' |
| 26 | + ''; |
| 27 | + }; |
| 28 | + |
| 29 | + test-unit = commonAttrs // { |
| 30 | + dependsOn = [ compile ]; |
| 31 | + label = "unit tests"; |
| 32 | + command = '' |
| 33 | + nix-shell --run '$SBT coverage test' |
| 34 | + ''; |
| 35 | + artifactPaths = [ |
| 36 | + "target/test-reports/**/*" |
| 37 | + "target/scala/2.12/scoverage-report/**/*" |
| 38 | + "target/scala/2.12/coverage-report/**/*" |
| 39 | + ]; |
| 40 | + }; |
| 41 | + |
| 42 | + test-evm = commonAttrs // { |
| 43 | + dependsOn = [ compile ]; |
| 44 | + label = "EVM tests"; |
| 45 | + command = '' |
| 46 | + nix-shell --run '$SBT coverage evm:test' |
| 47 | + ''; |
| 48 | + artifactPaths = [ |
| 49 | + "target/test-reports/**/*" |
| 50 | + "target/scala/2.12/scoverage-report/**/*" |
| 51 | + "target/scala/2.12/coverage-report/**/*" |
| 52 | + ]; |
| 53 | + }; |
| 54 | + |
| 55 | + test-integration = commonAttrs // { |
| 56 | + dependsOn = [ compile ]; |
| 57 | + label = "integration tests"; |
| 58 | + command = '' |
| 59 | + nix-shell --run '$SBT coverageOff it:test' |
| 60 | + ''; |
| 61 | + artifactPaths = [ "target/test-reports/**/*" ]; |
| 62 | + }; |
| 63 | + |
| 64 | + test-ets = commonAttrs // { |
| 65 | + dependsOn = [ compile ]; |
| 66 | + label = "ETS"; |
| 67 | + command = '' |
| 68 | + nix-shell --run './test-ets.sh' |
| 69 | + ''; |
| 70 | + }; |
| 71 | + |
| 72 | + coverageReport = commonAttrs // { |
| 73 | + dependsOn = [ test-unit test-evm ]; |
| 74 | + label = "coverage report"; |
| 75 | + command = '' |
| 76 | + nix-shell --run '$SBT coverageReport coverageAggregate' |
| 77 | + ''; |
| 78 | + }; |
| 79 | + |
| 80 | + additional = commonAttrs // { |
| 81 | + dependsOn = [ compile ]; |
| 82 | + label = "additional compilation & dist"; |
| 83 | + command = '' |
| 84 | + nix-shell --run '$SBT benchmark:compile snappy:compile dist' |
| 85 | + ''; |
| 86 | + }; |
| 87 | + }; |
| 88 | +} |
0 commit comments