Skip to content

Commit

Permalink
Simplify linux test matrix. (conda#10835)
Browse files Browse the repository at this point in the history
* Simplify linux test matrix.

* Quoting?

* Run instead of use.

* Mount CWD to find the test scripts.

* No it.

* Add WORKDIR.

* Workdir.

* Less clutter.

* Minor UX fixes.
  • Loading branch information
jezdez authored Aug 3, 2021
1 parent f966799 commit 51eaaaf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 79 deletions.
79 changes: 5 additions & 74 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CondaCI
name: CI tests

on:
push:
Expand Down Expand Up @@ -116,88 +116,19 @@ jobs:
entrypoint: /bin/bash
args: -c "/opt/conda/bin/flake8 --statistics"

linux-tests-py37:
linux-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version: ['3.7', '3.8', '3.9']
test_type: ['unit', 'integration']
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: py37 unit tests
if: ${{ matrix.test_type == 'unit' }}
uses: docker://continuumio/conda-ci-linux-64-python3.7:latest
with:
entrypoint: /bin/bash
args: ./ci/unit_test.sh
- name: py37 integration tests
if: ${{ matrix.test_type == 'integration' }}
uses: docker://continuumio/conda-ci-linux-64-python3.7:latest
with:
entrypoint: /bin/bash
args: ./ci/integration_tests.sh
- name: upload codecov
run: |
if [[ $(git diff origin/master --name-only | wc -l) == $(git diff origin/master --name-only | grep docs | wc -l) && $(git diff origin/master --name-only | grep docs) ]]; then
echo "No codecov report to upload"
else
bash <(curl -s https://codecov.io/bash)
fi
linux-tests-py38:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test_type: ['unit', 'integration']
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: py38 unit tests
if: ${{ matrix.test_type == 'unit' }}
uses: docker://continuumio/conda-ci-linux-64-python3.8:latest
with:
entrypoint: /bin/bash
args: ./ci/unit_test.sh
- name: py38 integration tests
if: ${{ matrix.test_type == 'integration' }}
uses: docker://continuumio/conda-ci-linux-64-python3.8:latest
with:
entrypoint: /bin/bash
args: ./ci/integration_tests.sh
- name: upload codecov
run: |
if [[ $(git diff origin/master --name-only | wc -l) == $(git diff origin/master --name-only | grep docs | wc -l) && $(git diff origin/master --name-only | grep docs) ]]; then
echo "No codecov report to upload"
else
bash <(curl -s https://codecov.io/bash)
fi
linux-tests-py39:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test_type: ['unit', 'integration']
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: py39 unit tests
if: ${{ matrix.test_type == 'unit' }}
uses: docker://continuumio/conda-ci-linux-64-python3.9:latest
with:
entrypoint: /bin/bash
args: ./ci/unit_test.sh
- name: py39 integration tests
if: ${{ matrix.test_type == 'integration' }}
uses: docker://continuumio/conda-ci-linux-64-python3.9:latest
with:
entrypoint: /bin/bash
args: ./ci/integration_tests.sh
- name: Python ${{ matrix.python_version }} ${{ matrix.test_type }} tests
run: docker run --rm -v ${PWD}:/conda --workdir=/conda continuumio/conda-ci-linux-64-python${{ matrix.python_version }}:latest /conda/ci/${{ matrix.test_type }}_tests.sh
- name: upload codecov
run: |
if [[ $(git diff origin/master --name-only | wc -l) == $(git diff origin/master --name-only | grep docs | wc -l) && $(git diff origin/master --name-only | grep docs) ]]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Build and Publish Conda CI Images
name: CI images

on:
schedule:
- cron: '0 0 * * 0'
pull_request:
paths:
- 'ci/Dockerfile'
- '.github/workflows/ci_image.yml'
- '.github/workflows/ci_images.yml'
push:
paths:
- 'ci/Dockerfile'
- '.github/workflows/ci_image.yml'
- '.github/workflows/ci_images.yml'
workflow_dispatch:

env:
Expand Down
8 changes: 6 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@

----------------------------------------

.. image:: https://github.com/conda/conda/workflows/CondaCI/badge.svg
:target: https://github.com/conda/conda/actions?query=workflow%3ACondaCI+branch%3Amaster
.. image:: https://github.com/conda/conda/actions/workflows/ci.yml/badge.svg
:target: https://github.com/conda/conda/actions/workflows/ci.yml
:alt: CI Tests (GitHub Actions)

.. image:: https://github.com/conda/conda/actions/workflows/ci_images.yml/badge.svg
:target: https://github.com/conda/conda/actions/workflows/ci_images.yml
:alt: CI Images (GitHub Actions)

.. image:: https://img.shields.io/codecov/c/github/conda/conda/master.svg?label=coverage
:alt: Codecov Status
:target: https://codecov.io/gh/conda/conda/branch/master
Expand Down
2 changes: 2 additions & 0 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ RUN /opt/conda/bin/conda install --update-all -y -c defaults \

USER test_user

WORKDIR /conda

ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/bin/bash"]
File renamed without changes.

0 comments on commit 51eaaaf

Please sign in to comment.