config.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # This config was automatically generated from your source code
  2. # Stacks detected: deps:java:.,deps:node:maxkey-web-frontend/maxkey-web-app,tool:gradle:
  3. version: 2.1
  4. orbs:
  5. node: circleci/node@5
  6. jobs:
  7. test-node:
  8. # Install node dependencies and run tests
  9. executor: node/default
  10. working_directory: ~/project/maxkey-web-frontend/maxkey-web-app
  11. steps:
  12. - checkout:
  13. path: ~/project
  14. - node/install-packages:
  15. pkg-manager: npm
  16. - run:
  17. name: Run tests
  18. command: npm test --passWithNoTests
  19. build-node:
  20. # Build node project
  21. executor: node/default
  22. working_directory: ~/project/maxkey-web-frontend/maxkey-web-app
  23. steps:
  24. - checkout:
  25. path: ~/project
  26. - node/install-packages:
  27. pkg-manager: npm
  28. - run:
  29. command: npm run build
  30. - run:
  31. name: Create the ~/artifacts directory if it doesn't exist
  32. command: mkdir -p ~/artifacts
  33. # Copy output to artifacts dir
  34. - run:
  35. name: Copy artifacts
  36. command: cp -R build dist public .output .next .docusaurus ~/artifacts 2>/dev/null || true
  37. - store_artifacts:
  38. path: ~/artifacts
  39. destination: node-build
  40. test-java:
  41. docker:
  42. - image: cimg/openjdk:17.0
  43. steps:
  44. - checkout
  45. - run:
  46. name: Calculate cache key
  47. command: |-
  48. find . -name 'pom.xml' -o -name 'gradlew*' -o -name '*.gradle*' | \
  49. sort | xargs cat > /tmp/CIRCLECI_CACHE_KEY
  50. - restore_cache:
  51. key: cache-{{ checksum "/tmp/CIRCLECI_CACHE_KEY" }}
  52. - run:
  53. command: ./gradlew check
  54. - store_test_results:
  55. path: build/test-results
  56. - save_cache:
  57. key: cache-{{ checksum "/tmp/CIRCLECI_CACHE_KEY" }}
  58. paths:
  59. - ~/.gradle/caches
  60. - store_artifacts:
  61. path: build/reports
  62. deploy:
  63. # This is an example deploy job, not actually used by the workflow
  64. docker:
  65. - image: cimg/base:stable
  66. steps:
  67. # Replace this with steps to deploy to users
  68. - run:
  69. name: deploy
  70. command: '#e.g. ./deploy.sh'
  71. workflows:
  72. build-and-test:
  73. jobs:
  74. - test-node
  75. - build-node:
  76. requires:
  77. - test-node
  78. - test-java
  79. - test-java
  80. # - deploy:
  81. # requires:
  82. # - build-node