diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7d21e80..7903dfd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,11 +1,19 @@ name: CI on: push: + branches: + - main pull_request: + branches: + - main schedule: - cron: '0 0 * * *' # Daily “At 00:00” workflow_dispatch: # allows you to trigger manually +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: name: python-${{ matrix.python-version }} @@ -19,20 +27,16 @@ jobs: matrix: python-version: ['3.7', '3.8', '3.9'] steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.10.0 - with: - access_token: ${{ github.token }} - uses: actions/checkout@v3 - - uses: conda-incubator/setup-miniconda@v2 + + - name: Create conda environment + uses: mamba-org/provision-with-micromamba@main with: - channels: conda-forge - channel-priority: strict - mamba-version: '*' - activate-environment: intake-thredds-dev - auto-update-conda: false - python-version: ${{ matrix.python-version }} + cache-downloads: true + micromamba-version: 'latest' environment-file: ci/environment.yml + extra-specs: | + python=${{ matrix.python-version }} - name: Install intake-thredds run: | @@ -60,20 +64,16 @@ jobs: run: shell: bash -l {0} steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.10.0 - with: - access_token: ${{ github.token }} - uses: actions/checkout@v3 - - uses: conda-incubator/setup-miniconda@v2 + + - name: Create conda environment + uses: mamba-org/provision-with-micromamba@main with: - channels: conda-forge - channel-priority: strict - mamba-version: '*' - activate-environment: intake-thredds-dev - auto-update-conda: false - python-version: 3.8 + cache-downloads: true + micromamba-version: 'latest' environment-file: ci/environment-upstream-dev.yml + extra-specs: | + python=3.9 - name: Install intake-thredds run: | python -m pip install . --no-deps