diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index d239237..eaaa60e 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -19,10 +19,10 @@ jobs: run: | if [ "${{ github.event_name }}" == 'push' ] && [ "${{ github.repository }}" != "${{ github.actor }}/express-api-template" ]; then echo "Stopping job because it's a repository creation event." - echo "::set-output name=result::failure" + echo "::save-state name=result::failure" else echo "Proceeding with the job." - echo "::set-output name=result::success" + echo "::save-state name=result::success" fi - name: Checkout code and Use Node.js @@ -34,6 +34,15 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - run: yarn install - - run: yarn lint - - run: yarn test:coverage + + - name: Install dependencies + if: ${{ needs.build.outputs.result == 'success' }} + run: yarn install + + - name: Lint + if: ${{ needs.build.outputs.result == 'success' }} + run: yarn lint + + - name: Test and Coverage + if: ${{ needs.build.outputs.result == 'success' }} + run: yarn test:coverage