Skip to content

Commit

Permalink
Create action.yml (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschm authored Nov 28, 2024
1 parent c89809c commit 8b001a4
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions actions/setup-environment-uv/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2023 Stanford University Convex Optimization Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Setup the Python Environment

description: "Construct a Python environment for ci/cd using uv"

on:
workflow_call:
inputs:
python-version:
description: 'Python version'
type: string
required: false
default: '3.12'

runs:
using: "composite"
steps:
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
# Install a specific version of uv.
version: "0.5.4"

- name: Set up Python ${{ inputs.python-version || '3.12' }}
shell: bash
run: |
uv python install ${{ inputs.python-version || '3.12' }}
- name: Install the project
shell: bash
run: |
uv sync --all-extras --dev

0 comments on commit 8b001a4

Please sign in to comment.