generated from cisagov/ScubaGear
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename action to initialize-scubagoggles; move majority of steps out …
…of workflow into action for reuse
- Loading branch information
1 parent
e6a2bd7
commit a9e011a
Showing
3 changed files
with
60 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Initialize ScubaGoggles | ||
inputs: | ||
python-version: | ||
required: true | ||
default: "3.12" | ||
cache-dependency-path: | ||
required: true | ||
default: "requirements.txt" | ||
operating-system: | ||
required: true | ||
default: "windows" | ||
opa-version: | ||
required: true | ||
default: "0.60.0" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
cache: "pip" | ||
cache-dependency-path: ${{ inputs.cache-dependency-path }} | ||
|
||
- name: Setup virtualenv for Windows | ||
if: ${{ inputs.operating-system == "windows" }} | ||
shell: powershell | ||
run: | | ||
pip install virtualenv | ||
python -m venv .venv | ||
.venv\Scripts\activate | ||
- name: Setup virtualenv for MacOS | ||
if: ${{ inputs.operating-system == "macos" }} | ||
shell: bash | ||
run: | | ||
pip install virtualenv | ||
virtualenv -p python .venv | ||
source .venv/bin/activate | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install . | ||
pip install -r requirements.txt | ||
pip install pytest | ||
pip uninstall numpy | ||
pip install -y numpy==1.26.4 | ||
- name: Download OPA executable | ||
run: python download_opa.py -v ${{ inputs.opa-version }} -os ${{ inputs.operating-system }} |
This file was deleted.
Oops, something went wrong.
This file contains 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