Convert validate-openapi to a Hydra job

This commit is contained in:
Eelco Dolstra 2021-01-03 18:47:05 +01:00
parent ce7b23ae09
commit 525a229dac
2 changed files with 9 additions and 9 deletions

View file

@ -11,12 +11,4 @@ jobs:
fetch-depth: 0
- uses: cachix/install-nix-action@v12
#- run: nix flake check
- run: nix-build -A checks.x86_64-linux.build
#validate-openapi:
# runs-on: ubuntu-18.04
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - uses: cachix/install-nix-action@v12
# - run: nix-shell -p openapi-generator-cli --run "openapi-generator-cli validate -i ./hydra-api.yaml"
- run: nix-build -A checks.x86_64-linux.build -A checks.x86_64-linux.validate-openapi

View file

@ -482,11 +482,19 @@
'';
};
tests.validate-openapi = pkgs.runCommand "validate-openapi"
{ buildInputs = [ pkgs.openapi-generator-cli ]; }
''
openapi-generator-cli validate -i ${./hydra-api.yaml}
touch $out
'';
container = nixosConfigurations.container.config.system.build.toplevel;
};
checks.x86_64-linux.build = hydraJobs.build.x86_64-linux;
checks.x86_64-linux.install = hydraJobs.tests.install.x86_64-linux;
checks.x86_64-linux.validate-openapi = hydraJobs.tests.validate-openapi;
packages.x86_64-linux.hydra = pkgs.hydra;
defaultPackage.x86_64-linux = pkgs.hydra;