Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
JonZeolla committed Aug 31, 2023
1 parent e6d378f commit 7f19023
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 52 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ jobs:
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-python-${{ env.python_version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
- name: Install the dependencies
run: |
python -m pip install --upgrade pipenv
mkdir "${RUNNER_TEMP}/bin"
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b "${RUNNER_TEMP}/bin"
chmod +x "${RUNNER_TEMP}/bin/syft"
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b "${RUNNER_TEMP}/bin"
chmod +x "${RUNNER_TEMP}/bin/grype"
echo "${RUNNER_TEMP}/bin" >> "${GITHUB_PATH}"
- name: Install Task
uses: arduino/setup-task@v1
- name: Initialize the repo
Expand Down Expand Up @@ -96,8 +87,6 @@ jobs:
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-python-${{ env.python_version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
- name: Install the dependencies
run: python -m pip install --upgrade pipenv
- name: Install Task
uses: arduino/setup-task@v1
- name: Initialize the repo
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ jobs:
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-python-${{ env.python_version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
- name: Install the dependencies
run: |
python -m pip install --upgrade pipenv
echo "CODEQL_PYTHON=$(pipenv run which python)" >> "${GITHUB_ENV}"
- name: Install Task
uses: arduino/setup-task@v1
- name: Initialize the repo
run: task -v init
- name: Setup CodeQL
run: echo "CODEQL_PYTHON=$(pipenv run which python)" >> "${GITHUB_ENV}"
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-python-${{ env.python_version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
- name: Install the dependencies
run: python -m pip install --upgrade pipenv
- name: Install Task
uses: arduino/setup-task@v1
- name: Initialize the repo
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
repos:
- repo: https://github.com/seisollc/goat
rev: a8d2863396772ec95330996372dd4e48f2490438 # frozen: v2023.08.22
rev: 6525fcbbea8dacda7c09e20ac8a78c2b763ccaa4 # frozen: v2023.08.26
hooks:
- id: seiso-lint
32 changes: 21 additions & 11 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ tasks:
internal: true
sources:
- Pipfile.lock
preconditions:
- which pipenv || python -m pip install --upgrade pipenv
cmds:
- pipenv install --deploy --ignore-pipfile --dev

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ jobs:
with:
path: ~/.local/share/virtualenvs
key: ${{ "{{ runner.os }}" }}-python-${{ "{{ env.python_version }}" }}-pipenv-${{ "{{ hashFiles('Pipfile.lock') }}" }}
- name: Install the dependencies
run: |
python -m pip install --upgrade pipenv
mkdir "${RUNNER_TEMP}/bin"
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b "${RUNNER_TEMP}/bin"
chmod +x "${RUNNER_TEMP}/bin/syft"
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b "${RUNNER_TEMP}/bin"
chmod +x "${RUNNER_TEMP}/bin/grype"
echo "${RUNNER_TEMP}/bin" >> "${GITHUB_PATH}"
- name: Install Task
uses: arduino/setup-task@v1
- name: Initialize the repo
Expand Down Expand Up @@ -118,8 +109,6 @@ jobs:
with:
path: ~/.local/share/virtualenvs
key: ${{ "{{ runner.os }}" }}-python-${{ "{{ env.python_version }}" }}-pipenv-${{ "{{ hashFiles('Pipfile.lock') }}" }}
- name: Install the dependencies
run: python -m pip install --upgrade pipenv
- name: Install Task
uses: arduino/setup-task@v1
- name: Initialize the repo
Expand Down Expand Up @@ -169,8 +158,6 @@ jobs:
with:
path: ~/.local/share/virtualenvs
key: ${{ "{{ runner.os }}" }}-python-${{ "{{ env.python_version }}" }}-pipenv-${{ "{{ hashFiles('Pipfile.lock') }}" }}
- name: Install the dependencies
run: python -m pip install --upgrade pipenv
- name: Install Task
uses: arduino/setup-task@v1
- name: Initialize the repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ jobs:
with:
path: ~/.local/share/virtualenvs
key: ${{ "{{ runner.os }}" }}-python-${{ "{{ env.python_version }}" }}-pipenv-${{ "{{ hashFiles('Pipfile.lock') }}" }}
- name: Install the dependencies
run: python -m pip install --upgrade pipenv
- name: Install Task
uses: arduino/setup-task@v1
- name: Initialize the repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,12 @@ jobs:
with:
path: ~/.local/share/virtualenvs
key: ${{ "{{ runner.os }}" }}-python-${{ "{{ env.python_version }}" }}-pipenv-${{ "{{ hashFiles('Pipfile.lock') }}" }}
- name: Install the dependencies
run: |
python -m pip install --upgrade pipenv
echo "CODEQL_PYTHON=$(pipenv run which python)" >> "${GITHUB_ENV}"
- name: Install Task
uses: arduino/setup-task@v1
- name: Initialize the repo
run: task -v init
- name: Setup CodeQL
run: echo "CODEQL_PYTHON=$(pipenv run which python)" >> "${GITHUB_ENV}"
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:
with:
path: ~/.local/share/virtualenvs
key: ${{ "{{ runner.os }}" }}-python-${{ "{{ env.python_version }}" }}-pipenv-${{ "{{ hashFiles('Pipfile.lock') }}" }}
- name: Install the dependencies
run: python -m pip install --upgrade pipenv
- name: Install Task
uses: arduino/setup-task@v1
- name: Initialize the repo
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_name|replace(" ", "")}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Welcome to {{ cookiecutter.project_name }}

## Getting Started

First, you need to ensure you have `task`, `docker`, `git`, `pipenv`, and `python3` installed locally, and the `docker` daemon is running.
First, you need to ensure you have `task`, `docker`, `git`, and `python3` installed locally, and the `docker` daemon is running.

Then, you can setup your local environment via:

Expand Down
24 changes: 24 additions & 0 deletions {{cookiecutter.project_name|replace(" ", "")}}/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ includes:
PYTHON_VERSION: '{{ "{{.PYTHON_VERSION}}" }}'
VERSION: '{{ "{{.VERSION}}" }}'

base:
taskfile: ./goat/Task/Taskfile.yml
internal: true
optional: true

vars:
IMAGE_NAME: seiso/{{ cookiecutter.project_slug }}
PROJECT_SLUG: {{ cookiecutter.project_slug }}
Expand Down Expand Up @@ -50,6 +55,8 @@ tasks:
internal: true
sources:
- Pipfile.lock
preconditions:
- which pipenv || python -m pip install --upgrade pipenv
cmds:
- pipenv install --deploy --ignore-pipfile --dev

Expand Down Expand Up @@ -78,12 +85,29 @@ tasks:
# Don't run this in pipelines
- '{{ "{{" }}if ne .GITHUB_ACTIONS "true"{{ "}}pipenv run pre-commit install{{else}}echo \"Detected a github actions pipeline; skipping the pre-commit install\"{{end}}" }}'

init-install-tools:
desc: Install required tools
internal: true
cmds:
- task: base:mac-brew-install
vars:
TOOLS: syft,grype
- task: base:runner-curl-install
vars:
INSTALL_URL: https://raw.githubusercontent.com/anchore/syft/main/install.sh
TOOL: syft
- task: base:runner-curl-install
vars:
INSTALL_URL: https://raw.githubusercontent.com/anchore/grype/main/install.sh
TOOL: grype

init:
desc: Initialize the repo for local use; intended to be run after git clone
cmds:
- task: init-pipenv
- task: init-submodules
- task: init-pre-commit
- task: init-install-tools

lint:
desc: Run the linter(s); paved road projects use the Seiso goat 🐐
Expand Down

0 comments on commit 7f19023

Please sign in to comment.