Revision 37c5370106db1465372a14b225e90fee12e0fe1b authored by pyxieloustar on 31 January 2022, 21:11:03 UTC, committed by pyxieloustar on 04 April 2022, 21:20:19 UTC
1 parent c5bf08c
config.yml
version: 2.1
orbs:
codecov: codecov/codecov@1.0.2 # to get this to work, had to opt-in to using third party orbs in Organization Security settings.
jobs:
pyuvdata:
parameters:
python_version:
type: string
env_name:
type: string
machine:
image: ubuntu-2004:202101-01
environment:
PYTHON: << parameters.python_version >>
ENV_NAME: << parameters.env_name >>
WITH_SUDO: true
OS: "linux"
# Circleci builds fail on forks because the version gets munged. (see #1029)
SETUPTOOLS_SCM_PRETEND_VERSION: "0.0.1"
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
- run:
name: Install miniconda
command: |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh;
bash $HOME/miniconda.sh -b -p $HOME/miniconda
- run:
name: configure conda environment
command: |
export PATH="$HOME/miniconda/bin:$PATH"
./ci/install_conda.sh
- run:
name: install
command: |
export PATH="$HOME/miniconda/bin:$PATH"
source activate ${ENV_NAME}
CFLAGS="-DCYTHON_TRACE=1 -DCYTHON_TRACE_NOGIL=1" pip install .
- run:
name: run pyuvdata tests
command: |
export PATH="$HOME/miniconda/bin:$PATH"
source activate ${ENV_NAME}
mkdir test-reports
mkdir -p empty
cd empty
pytest --pyargs pyuvdata -n auto --dist=loadfile --cov=pyuvdata --cov-config="../.coveragerc" --cov-report xml:".././coverage.xml" --junitxml="../test-reports/xunit.xml"
cd ..
- save_cache:
key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
paths:
- "/opt/conda/envs/${ENV_NAME}/"
- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports
- codecov/upload:
file: ./coverage.xml
warning_test:
parameters:
python_version:
type: string
env_name:
type: string
machine:
image: ubuntu-2004:202101-01
environment:
PYTHON: << parameters.python_version >>
ENV_NAME: << parameters.env_name >>
WITH_SUDO: true
OS: "linux"
# Circleci builds fail on forks because the version gets munged. (see #1029)
SETUPTOOLS_SCM_PRETEND_VERSION: "0.0.1"
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
- run:
name: Install miniconda
command: |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh;
bash $HOME/miniconda.sh -b -p $HOME/miniconda
- run:
name: configure conda environment
command: |
export PATH="$HOME/miniconda/bin:$PATH"
./ci/install_conda.sh
- run:
name: install
command: |
export PATH="$HOME/miniconda/bin:$PATH"
source activate ${ENV_NAME}
CFLAGS="-DCYTHON_TRACE=1 -DCYTHON_TRACE_NOGIL=1" pip install .
- run:
name: run pyuvdata tests
command: |
export PATH="$HOME/miniconda/bin:$PATH"
source activate ${ENV_NAME}
mkdir test-reports
mkdir -p empty
cd empty
pytest -W error --pyargs pyuvdata -n auto --dist=loadfile --cov=pyuvdata --cov-config="../.coveragerc" --cov-report xml:".././coverage.xml" --junitxml="../test-reports/xunit.xml"
cd ..
- save_cache:
key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
paths:
- "/opt/conda/envs/${ENV_NAME}/"
- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports
- codecov/upload:
file: ./coverage.xml
doctest:
parameters:
python_version:
type: string
env_name:
type: string
docker:
- image: continuumio/miniconda3:latest
environment:
PYTHON: << parameters.python_version >>
ENV_NAME: << parameters.env_name >>
OS: "linux"
# Circleci builds fail on forks because the version gets munged. (see #1029)
SETUPTOOLS_SCM_PRETEND_VERSION: "0.0.1"
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
- run:
name: configure conda environment
command: ./ci/install_conda.sh
- run:
name: install
command: |
source activate ${ENV_NAME}
pip install -e .
- run:
name: run tutorial tests
command: |
source activate ${ENV_NAME}
cd docs
python -m pytest -n 2 --doctest-glob="*.rst"
cd ..
- save_cache:
key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
paths:
- "/opt/conda/envs/${ENV_NAME}/"
workflows:
version: 2
build_and_test:
jobs:
- pyuvdata:
name: pyuvdata_3.7
python_version: "3.7"
env_name: "pyuvdata_tests"
- pyuvdata:
name: pyuvdata_3.8
python_version: "3.8"
env_name: "pyuvdata_tests"
- pyuvdata:
name: pyuvdata_3.9
python_version: "3.9"
env_name: "pyuvdata_tests"
- pyuvdata:
name: pyuvdata_min_deps
python_version: "3.8"
env_name: "pyuvdata_min_deps_tests"
- warning_test:
name: pyuvdata_warning_test
python_version: "3.8"
env_name: "pyuvdata_tests"
- doctest:
python_version: "3.8"
env_name: "pyuvdata_tests"
Computing file changes ...