Skip to content

Commit

Permalink
moving steps to a better location
Browse files Browse the repository at this point in the history
  • Loading branch information
ramykl committed Dec 28, 2023
1 parent 935a545 commit 0119b40
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 30 deletions.
72 changes: 72 additions & 0 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,27 +203,51 @@ workflows:
app-dir: "~/project/sample"
cache-version: v4
test-results-for: jest
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/pnpm-lock.yaml
rm ~/project/sample/yarn.lock
- node/test:
filters: *filters
name: node-yarn-jest-test-job
app-dir: "~/project/sample"
cache-version: v4
test-results-for: jest
pkg-manager: yarn
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/package-lock.json
rm ~/project/sample/pnpm-lock.yaml
- node/test:
filters: *filters
name: node-pnpm-jest-test-job
app-dir: "~/project/sample"
cache-version: v4
test-results-for: jest
pkg-manager: pnpm
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/package-lock.json
rm ~/project/sample/yarn.lock
- node/test:
filters: *filters
name: node-npm-mocha-test-job
app-dir: "~/project/sample"
cache-version: v4
test-results-for: mocha
run-command: testmocha
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/pnpm-lock.yaml
rm ~/project/sample/yarn.lock
- node/test:
filters: *filters
name: node-yarn-mocha-test-job
Expand All @@ -232,6 +256,12 @@ workflows:
test-results-for: mocha
pkg-manager: yarn
run-command: testmocha
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/package-lock.json
rm ~/project/sample/pnpm-lock.yaml
- node/test:
filters: *filters
name: node-pnpm-mocha-test-job
Expand All @@ -240,6 +270,12 @@ workflows:
test-results-for: mocha
pkg-manager: pnpm
run-command: testmocha
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/package-lock.json
rm ~/project/sample/yarn.lock
- node/test:
filters: *filters
name: node-yarn-mocha-with-test-result-path-job
Expand All @@ -249,37 +285,73 @@ workflows:
pkg-manager: yarn
run-command: testmocha
test-results-path: sample/test-results.xml
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/package-lock.json
rm ~/project/sample/pnpm-lock.yaml
- node/test:
filters: *filters
name: node-test-results-file-job
app-dir: "~/project/sample"
cache-version: v4
test-results-path: sample/other-junit.xml
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/pnpm-lock.yaml
rm ~/project/sample/yarn.lock
- node/test:
filters: *filters
name: node-test-no-junit
app-dir: "~/project/sample"
cache-version: v4
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/pnpm-lock.yaml
rm ~/project/sample/yarn.lock
- node/run:
filters: *filters
name: node-run-npm-job
app-dir: "~/project/sample"
cache-version: v4
npm-run: build
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/pnpm-lock.yaml
rm ~/project/sample/yarn.lock
- node/run:
filters: *filters
name: node-run-yarn-job
app-dir: "~/project/sample"
cache-version: v5
pkg-manager: yarn
yarn-run: build
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/package-lock.json
rm ~/project/sample/pnpm-lock.yaml
- node/run:
filters: *filters
name: node-run-pnpm-job
app-dir: "~/project/sample"
cache-version: v5
pkg-manager: pnpm
pnpm-run: build
setup:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/package-lock.json
rm ~/project/sample/yarn.lock
- integration-test-override-ci:
filters: *filters
- integration-test-override-ci-windows:
Expand Down
30 changes: 0 additions & 30 deletions src/jobs/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,36 +69,6 @@ executor:
steps:
- checkout
- steps: << parameters.setup >>
- when:
condition:
and:
- equal: [ npm, << parameters.pkg-manager >> ]
steps:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/pnpm-lock.yaml
rm ~/project/sample/yarn.lock
- when:
condition:
and:
- equal: [ pnpm, << parameters.pkg-manager >> ]
steps:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/package-lock.json
rm ~/project/sample/yarn.lock
- when:
condition:
and:
- equal: [ yarn, << parameters.pkg-manager >> ]
steps:
- run:
name: Remove other lock files
command: |
rm ~/project/sample/package-lock.json
rm ~/project/sample/pnpm-lock.yaml
- install-packages:
app-dir: <<parameters.app-dir>>
pkg-manager: <<parameters.pkg-manager>>
Expand Down

0 comments on commit 0119b40

Please sign in to comment.