Skip to content

Bump actions/checkout from 4.2.1 to 4.2.2 (#179) #183

Bump actions/checkout from 4.2.1 to 4.2.2 (#179)

Bump actions/checkout from 4.2.1 to 4.2.2 (#179) #183

Workflow file for this run

name: build
on:
workflow_call:
outputs:
date:
value: ${{ jobs.date.outputs.date }}
workflow_dispatch:
push:
release:
types:
- published
concurrency:
group: build-${{ github.ref }}
defaults:
run:
shell: micromamba-shell {0}
jobs:
date:
runs-on: ubuntu-latest
steps:
- run: echo "date=$(date +%Y.%m.%d)" >> $GITHUB_OUTPUT
id: date
shell: bash
outputs:
date: ${{ steps.date.outputs.date }}
build:
needs: [ date ]
strategy:
fail-fast: false
matrix:
# the macOS 13 runner is on Intel hardware
runs-on: [ ubuntu-latest, macos-13, macos-latest ]
python-version: [ '3.10', '3.11', '3.12' ]
runs-on: ${{ matrix.runs-on }}
name: build (Python ${{ matrix.python-version }}, ${{ matrix.runs-on }})
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246 # v2.0.0
with:
environment-name: stenv-${{ runner.os }}-py${{ matrix.python-version }}
environment-file: environment.yaml
create-args: >-
python=${{ matrix.python-version }}
cache-downloads: true
cache-downloads-key: downloads-${{ needs.date.outputs.date }}
cache-environment: true
cache-environment-key: environment-${{ needs.date.outputs.date }}
init-shell: none
generate-run-shell: true
- run: echo "filename=stenv-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{ needs.date.outputs.date }}.yaml" >> $GITHUB_OUTPUT
id: output
- run: |
micromamba env export --no-build | grep -v "name:" | grep -v "prefix:" > ${{ steps.output.outputs.filename }}
pip freeze > pip_requirements.txt
python tools/mamba_export_pip.py ${{ steps.output.outputs.filename }} pip_requirements.txt > mamba_packages.yml
mv mamba_packages.yml ${{ steps.output.outputs.filename }}
cat ${{ steps.output.outputs.filename }}
- run: pip install pytest
- run: pytest tests/test_import.py
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: ${{ steps.output.outputs.filename }}
path: ${{ steps.output.outputs.filename }}
- if: (github.event_name == 'release' && github.event.action == 'published')
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0
with:
file: ${{ steps.output.outputs.filename }}