diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f2f49d8e..2eb63b66 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -84,26 +84,12 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - # - name: Set up Python - # uses: actions/setup-python@v5 - # with: - # python-version: ${{ matrix.python-version }} - # - name: Cache conda - # uses: actions/cache@v4 - # env: - # # Increase this value to reset cache if etc/example-environment.yml has not changed - # CACHE_NUMBER: 0 - # with: - # path: ~/conda_pkgs_dir - # key: conda-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} - name: Add conda ${{ matrix.python-version }} to system path uses: conda-incubator/setup-miniconda@v3 with: activate-environment: "test_env" auto-activate-base: false - #architecture: "x64" miniforge-variant: Mambaforge - #miniforge-version: latest python-version: ${{ matrix.python-version }} auto-update-conda: true environment-file: ${{ matrix.environment }} @@ -158,13 +144,13 @@ jobs: #conda install --use-local astromodels conda install -c ${CONDA}/envs/test_env/conda-bld/ astromodels - - name: Test conda build + - name: Test import xspec + if: matrix.os != 'macos-latest' shell: bash -l {0} - run: | - cd astromodels/tests - echo "======> importing XSPEC..." - python -c "import astromodels.xspec" - python -m pytest -vv --cov=astromodels --cov-report=xml + run: python -c "import astromodels.xspec" + - name: Test astromodels + shell: bash -l {0} + run: python -m pytest -vv --cov=astromodels --cov-report=xml env: OMP_NUM_THREADS: 1 MKL_NUM_THREADS: 1 @@ -188,14 +174,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - #- name: Cache conda - # uses: actions/cache@v4 - # env: - # # Increase this value to reset cache if etc/example-environment.yml has not changed - # CACHE_NUMBER: 0 - # with: - # path: ~/conda_pkgs_dir - # key: conda-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} - name: Add conda ${{ matrix.python-version }} to system path uses: conda-incubator/setup-miniconda@v3 with: diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index ceebdf89..9020170c 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -110,21 +110,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - # - name: Cache conda - # uses: actions/cache@v4 - # env: - # # Increase this value to reset cache if etc/example-environment.yml has not changed - # CACHE_NUMBER: 0 - # with: - # path: ~/conda_pkgs_dir - # key: conda-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} - name: Add conda ${{ matrix.python-version }} to system path uses: conda-incubator/setup-miniconda@v3 with: activate-environment: "test_env" auto-activate-base: false - #architecture: "x64" - #mamba-version: "*" miniforge-version: latest python-version: ${{ matrix.python-version }} auto-update-conda: true @@ -132,8 +122,6 @@ jobs: use-only-tar-bz2: true channel-priority: strict channels: conda-forge, xspecmodels - - - name: Init Env shell: bash -l {0} run: | @@ -170,24 +158,13 @@ jobs: # stop the build if there are Python syntax errors or undefined names flake8 - - name: Test conda install - if: matrix.os == 'macos-latest' + - name: Test import xspec + if: matrix.os != 'macos-latest' shell: bash -l {0} - run: python -m pytest -vv --cov=astromodels --cov-report=xml - env: - OMP_NUM_THREADS: 1 - MKL_NUM_THREADS: 1 - NUMEXPR_NUM_THREADS: 1 - MPLBACKEND: "Agg" - - name: Test conda install - if: matrix.os != 'macos-latest' + run: python -c "import astromodels.xspec" + - name: Test astromodels shell: bash -l {0} - run: | - - echo "======> importing XSPEC..." - python -c "import astromodels.xspec" - python -m pytest -vv --cov=astromodels --cov-report=xml - + run: python -m pytest -vv --cov=astromodels --cov-report=xml env: OMP_NUM_THREADS: 1 MKL_NUM_THREADS: 1