Skip to content

Commit

Permalink
CI: More updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
zssherman committed Jul 6, 2023
1 parent 674aa6d commit c1677ed
Showing 1 changed file with 9 additions and 25 deletions.
34 changes: 9 additions & 25 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ on:

jobs:
build:
name: Build (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.python-version }}
if: github.repository == 'openradar/cmweather'
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: bash -l {0}
Expand All @@ -24,41 +25,24 @@ jobs:
python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set environment variables
run: |
if [[ ${{ matrix.os }} == windows* ]] ;
then
echo "CONDA_ENV_FILE=ci/environment-windows.yml" >> $GITHUB_ENV
else
echo "CONDA_ENV_FILE=ci/environment.yml" >> $GITHUB_ENV

fi
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
hashFiles('ci/requirements/**.yml') }}
# Install dependencies
- name: Setup Conda Environment
- uses: mamba-org/setup-micromamba@v1
with:
activate-environment: cmweather-dev
python-version: ${{ matrix.python-version }}
cache-downloads: true
environment-file: ci/environment.yml

- name: Install conda dependencies
run: |
mamba env update -f $CONDA_ENV_FILE
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
- name: Set up conda environment
shell: bash -l {0}
run: |
python -m pip install -e .
conda list
python -m pip install -e . --no-deps --force-reinstall
- name: Run Tests
shell: bash -l {0}
Expand Down

0 comments on commit c1677ed

Please sign in to comment.