From db3de7cb1199491a7b51067027bbfc8d22cc07e9 Mon Sep 17 00:00:00 2001 From: Luigi Bonati Date: Tue, 15 Nov 2022 23:39:16 +0100 Subject: [PATCH] revert changes in CI --- .github/workflows/CI.yaml | 48 ++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index debcd2a0..02846e88 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -2,12 +2,15 @@ name: CI on: # GitHub has started calling new repo's first branch "main" https://github.com/github/renaming - # The cookiecutter uses the "--initial-branch" flag when it runs git-init + # Existing codes likely still have "master" as the primary branch + # Both are tracked here to keep legacy and new codes working push: branches: + - "master" - "main" pull_request: branches: + - "master" - "main" schedule: # Weekly tests run on main by default: @@ -22,10 +25,10 @@ jobs: strategy: matrix: os: [macOS-latest, ubuntu-latest, windows-latest] - python-version: [3.8, 3.9] + python-version: [3.7, 3.8, 3.9] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v1 - name: Additional info about the build shell: bash @@ -34,25 +37,34 @@ jobs: df -h ulimit -a - # More info on options: https://github.com/marketplace/actions/provision-with-micromamba - - uses: mamba-org/provision-with-micromamba@main - with: - environment-file: devtools/conda-envs/test_env.yaml - environment-name: test - channels: conda-forge,defaults - extra-specs: | - python=${{ matrix.python-version }} - - name: Install package - # conda setup requires this special shell - shell: bash -l {0} - run: | - python -m pip install . --no-deps - micromamba list + # More info on options: https://github.com/conda-incubator/setup-miniconda + - uses: conda-incubator/setup-miniconda@v2 + with: + python-version: ${{ matrix.python-version }} + environment-file: devtools/conda-envs/test_env.yaml + + channels: conda-forge,defaults + + activate-environment: test + auto-update-conda: false + auto-activate-base: false + show-channel-urls: true + + - name: Install package + + # conda setup requires this special shell + shell: bash -l {0} + run: | + python -m pip install . --no-deps + conda list + - name: Run tests + # conda setup requires this special shell shell: bash -l {0} + run: | pytest -v --cov=mlcvs --cov-report=xml --color=yes mlcvs/tests/ @@ -61,4 +73,4 @@ jobs: with: file: ./coverage.xml flags: unittests - name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} + name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} \ No newline at end of file