|
1 |
| -version: 2 |
| 1 | +version: 2.1 |
2 | 2 | jobs:
|
3 | 3 | build:
|
4 | 4 | working_directory: ~/rocky/python-spark
|
5 | 5 | parallelism: 1
|
6 |
| - shell: /bin/bash --login |
7 |
| - # CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did. |
8 |
| - # If any of these refer to each other, rewrite them so that they don't or see https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables . |
9 |
| - environment: |
10 |
| - CIRCLE_ARTIFACTS: /tmp/circleci-artifacts |
11 |
| - CIRCLE_TEST_REPORTS: /tmp/circleci-test-results |
12 |
| - COMPILE: --compile |
13 |
| - # In CircleCI 1.0 we used a pre-configured image with a large number of languages and other packages. |
14 |
| - # In CircleCI 2.0 you can now specify your own image, or use one of our pre-configured images. |
15 |
| - # The following configuration line tells CircleCI to use the specified docker image as the runtime environment for you job. |
16 |
| - # We have selected a pre-built image that mirrors the build environment we use on |
17 |
| - # the 1.0 platform, but we recommend you choose an image more tailored to the needs |
18 |
| - # of each job. For more information on choosing an image (or alternatively using a |
19 |
| - # VM instead of a container) see https://circleci.com/docs/2.0/executor-types/ |
20 |
| - # To see the list of pre-built images that CircleCI provides for most common languages see |
21 |
| - # https://circleci.com/docs/2.0/circleci-images/ |
22 | 6 | docker:
|
23 |
| - - image: circleci/python:3.7.4 |
24 |
| - steps: |
25 |
| - # Machine Setup |
26 |
| - # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each |
27 |
| - # The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out. |
28 |
| - - checkout |
29 |
| - # Dependencies |
30 |
| - # This would typically go in either a build or a build-and-test job when using workflows |
31 |
| - # Restore the dependency cache |
32 |
| - - restore_cache: |
33 |
| - keys: |
34 |
| - - v2-dependencies-{{ .Branch }}- |
35 |
| - # fallback to using the latest cache if no exact match is found |
36 |
| - - v2-dependencies- |
| 7 | + - image: cimg/python:3.12 |
37 | 8 |
|
38 |
| - # This is based on your 1.0 configuration file or project settings |
39 |
| - - run: pip install --upgrade setuptools |
40 |
| - - run: pip install -e . |
41 |
| - - run: pip install -r requirements-dev.txt |
| 9 | + steps: |
| 10 | + # Checkout the code as the first step. |
| 11 | + - checkout |
| 12 | + - run: pip install --upgrade setuptools |
| 13 | + - run: pip install -e .[dev] |
| 14 | + - run: make check |
42 | 15 |
|
43 |
| - # Save dependency cache |
44 |
| - - save_cache: |
45 |
| - key: v2-dependencies-{{ .Branch }}-{{ epoch }} |
46 |
| - paths: |
47 |
| - # This is a broad list of cache paths to include many possible development environments |
48 |
| - # You can probably delete some of these entries |
49 |
| - - vendor/bundle |
50 |
| - - ~/virtualenvs |
51 |
| - - ~/.m2 |
52 |
| - - ~/.ivy2 |
53 |
| - - ~/.bundle |
54 |
| - - ~/.cache/bower |
| 16 | + - restore_cache: |
| 17 | + keys: |
| 18 | + # This branch if available |
| 19 | + - v2-dependencies-{{ .Branch }}- |
| 20 | + # Default branch if not |
| 21 | + - v2-dependencies-master- |
| 22 | + # Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly |
| 23 | + - v2-dependencies- |
55 | 24 |
|
56 |
| - # Test |
57 |
| - # This would typically be a build job when using workflows, possibly combined with build |
58 |
| - # This is based on your 1.0 configuration file or project settings |
59 |
| - - run: python ./setup.py develop && make check |
60 |
| - # Teardown |
61 |
| - # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each |
62 |
| - # Save test results |
63 |
| - - store_test_results: |
64 |
| - path: /tmp/circleci-test-results |
65 |
| - # Save artifacts |
66 |
| - - store_artifacts: |
67 |
| - path: /tmp/circleci-artifacts |
68 |
| - - store_artifacts: |
69 |
| - path: /tmp/circleci-test-results |
| 25 | + # Save dependency cache |
| 26 | + - save_cache: |
| 27 | + key: v2-dependencies-{{ .Branch }}-{{ epoch }} |
| 28 | + paths: |
| 29 | + # This is a broad list of cache paths to include many possible development environments |
| 30 | + # You can probably delete some of these entries |
| 31 | + - vendor/bundle |
| 32 | + - ~/virtualenvs |
| 33 | + - ~/.m2 |
| 34 | + - ~/.ivy2 |
| 35 | + - ~/.bundle |
| 36 | + - ~/.cache/bower |
0 commit comments