# Should 'requires' property keep artefacts from previous steps?

**URL:** <https://discuss.circleci.com/t/should-requires-property-keep-artefacts-from-previous-steps/17305>\
**Category:** Build Environment\
**Tags:** config, nodejs, docker, cci-20\
**Created:** [October 11, 2017, 3:07pm UTC](https://discuss.circleci.com/t/should-requires-property-keep-artefacts-from-previous-steps/17305 "2017-10-11T15:07:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajmas](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/ajmas/32/8895_2.png) [@ajmas](https://discuss.circleci.com/u/ajmas)\
**Post date:** [October 11, 2017, 3:07pm UTC](https://discuss.circleci.com/t/should-requires-property-keep-artefacts-from-previous-steps/17305/1 "2017-10-11T15:07:59Z")

</div>

I am following the example CircleCi 2.0 sample below:

[https://circleci.com/docs/2.0/sample-config/](https://circleci.com/docs/2.0/sample-config/)

The issue is that artefacts from the previous steps aren’t available to the next step, so this seems to make the sample config invalid? The only way I can make this work is by duplicating the checkout, install and build steps, otherwise the test fails, since neither checked out repo or node\_modules are retained from the the build job.

The workflow section is as follows:

```
workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test:
          requires:
            - build
          filters:
            branches:
              only: master

```

Can anyone tell me whether this is likely to be an issue in something I am doing or whether the sample-config is outdated?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:40am UTC](https://discuss.circleci.com/t/should-requires-property-keep-artefacts-from-previous-steps/17305/2 "2018-06-18T11:40:00Z")

</div>

Closed on June 18, 2018, 11:40am UTC


