diff --git a/pipelines/nodejs-app-testing.yml b/pipelines/nodejs-app-testing.yml index 74c7f32..c712065 100644 --- a/pipelines/nodejs-app-testing.yml +++ b/pipelines/nodejs-app-testing.yml @@ -1,32 +1,46 @@ --- resources: -- name: nodejs.org-git +- name: repo type: git icon: github source: uri: https://github.com/nodejs/nodejs.org.git +- name: node-image + type: registry-image + source: + repository: node + tag: 13.10.1-stretch + jobs: - name: test public: true plan: - - get: nodejs.org-git + - get: node-image + - get: repo trigger: true - - task: run-tests + - task: install + image: node-image config: + inputs: + - name: repo + outputs: + - name: dependencies + path: repo/node_modules platform: linux - image_resource: - type: registry-image - source: { repository: node } + run: + path: npm + args: ["install"] + dir: repo + - task: test + image: node-image + config: inputs: - - name: nodejs.org-git + - name: repo + - name: dependencies + path: repo/node_modules + platform: linux run: - path: /bin/sh - args: - - -c - - | - echo "Node Version: $(node --version)" - echo "NPM Version: $(npm --version)" - cd nodejs.org-git - npm install - npm test + path: npm + args: ["run", "test"] + dir: repo