diff --git a/.ci/master.yaml b/.ci/master.yaml index 0a1db665..b2d5b90d 100644 --- a/.ci/master.yaml +++ b/.ci/master.yaml @@ -6,7 +6,7 @@ spec: workspaces: - name: shared-data tasks: - - name: git-clone + - name: clone taskRef: resolver: hub params: @@ -24,4 +24,22 @@ spec: value: $(params.git_url) - name: revision value: $(params.git_revision) - # TODO add tests here + - name: test + workspaces: + - name: source + workspace: shared-data + taskSpec: + workspaces: + - name: source + stepTemplate: + image: nixos/nix:latest + workingDir: /workspace/source + steps: + # TODO optimize Nix cache, this is too slow + - name: pre-commit + command: + - nix-shell + - --command + args: + - "pre-commit run --color=always" + # TODO run more tests here diff --git a/.ci/pull-request.yaml b/.ci/pull-request.yaml index 4912c87a..61073952 100644 --- a/.ci/pull-request.yaml +++ b/.ci/pull-request.yaml @@ -6,7 +6,7 @@ spec: workspaces: - name: shared-data tasks: - - name: git-clone + - name: clone taskRef: resolver: hub params: @@ -24,7 +24,7 @@ spec: value: $(params.git_url) - name: revision value: $(params.git_revision) - - name: pre-commit + - name: test workspaces: - name: source workspace: shared-data @@ -35,7 +35,8 @@ spec: image: nixos/nix:latest workingDir: /workspace/source steps: - - name: run + # TODO optimize Nix cache, this is too slow + - name: pre-commit command: - nix-shell - --command