config.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Use the latest 2.1 version of CircleCI pipeline process engine.
  2. # See: https://circleci.com/docs/2.0/configuration-reference
  3. version: 2.1
  4. # Define a job to be invoked later in a workflow.
  5. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs
  6. jobs:
  7. build:
  8. # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
  9. # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
  10. docker:
  11. - image: ghcr.io/levkk/pgcat-ci:1.67
  12. environment:
  13. RUST_LOG: info
  14. LLVM_PROFILE_FILE: /tmp/pgcat-%m-%p.profraw
  15. RUSTC_BOOTSTRAP: 1
  16. CARGO_INCREMENTAL: 0
  17. RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cinstrument-coverage"
  18. RUSTDOCFLAGS: "-Cpanic=abort"
  19. - image: postgres:14
  20. command: ["postgres", "-p", "5432", "-c", "shared_preload_libraries=pg_stat_statements", "-c", "pg_stat_statements.track=all", "-c", "pg_stat_statements.max=100000"]
  21. environment:
  22. POSTGRES_USER: postgres
  23. POSTGRES_DB: postgres
  24. POSTGRES_PASSWORD: postgres
  25. POSTGRES_INITDB_ARGS: --auth-local=md5 --auth-host=md5 --auth=md5
  26. - image: postgres:14
  27. command: ["postgres", "-p", "7432", "-c", "shared_preload_libraries=pg_stat_statements", "-c", "pg_stat_statements.track=all", "-c", "pg_stat_statements.max=100000"]
  28. environment:
  29. POSTGRES_USER: postgres
  30. POSTGRES_DB: postgres
  31. POSTGRES_PASSWORD: postgres
  32. POSTGRES_INITDB_ARGS: --auth-local=scram-sha-256 --auth-host=scram-sha-256 --auth=scram-sha-256
  33. - image: postgres:14
  34. command: ["postgres", "-p", "8432", "-c", "shared_preload_libraries=pg_stat_statements", "-c", "pg_stat_statements.track=all", "-c", "pg_stat_statements.max=100000"]
  35. environment:
  36. POSTGRES_USER: postgres
  37. POSTGRES_DB: postgres
  38. POSTGRES_PASSWORD: postgres
  39. POSTGRES_INITDB_ARGS: --auth-local=scram-sha-256 --auth-host=scram-sha-256 --auth=scram-sha-256
  40. - image: postgres:14
  41. command: ["postgres", "-p", "9432", "-c", "shared_preload_libraries=pg_stat_statements", "-c", "pg_stat_statements.track=all", "-c", "pg_stat_statements.max=100000"]
  42. environment:
  43. POSTGRES_USER: postgres
  44. POSTGRES_DB: postgres
  45. POSTGRES_PASSWORD: postgres
  46. POSTGRES_INITDB_ARGS: --auth-local=scram-sha-256 --auth-host=scram-sha-256 --auth=scram-sha-256
  47. - image: postgres:14
  48. command: ["postgres", "-p", "10432", "-c", "shared_preload_libraries=pg_stat_statements"]
  49. environment:
  50. POSTGRES_USER: postgres
  51. POSTGRES_DB: postgres
  52. POSTGRES_PASSWORD: postgres
  53. POSTGRES_INITDB_ARGS: --auth-local=md5 --auth-host=md5 --auth=md5
  54. # Add steps to the job
  55. # See: https://circleci.com/docs/2.0/configuration-reference/#steps
  56. steps:
  57. - checkout
  58. - restore_cache:
  59. key: cargo-lock-2-{{ checksum "Cargo.lock" }}
  60. - run:
  61. name: "Lint"
  62. command: "cargo fmt --check"
  63. - run:
  64. name: "Tests"
  65. command: "cargo clean && cargo build && cargo test && bash .circleci/run_tests.sh && .circleci/generate_coverage.sh"
  66. - store_artifacts:
  67. path: /tmp/cov
  68. destination: coverage-data
  69. - save_cache:
  70. key: cargo-lock-2-{{ checksum "Cargo.lock" }}
  71. paths:
  72. - target
  73. - ~/.cargo
  74. # Invoke jobs via workflows
  75. # See: https://circleci.com/docs/2.0/configuration-reference/#workflows
  76. workflows:
  77. build:
  78. jobs:
  79. - build