Bump actions/cache from 4.0.2 to 4.1.0 #159
Workflow file for this run
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
| - uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1.9.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 pytest-xdist | |
| - run: pytest -n auto tests/test_import.py | |
| - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
| 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 }} |