Skip to content

Commit

Permalink
hato-botのCIを反映するよ!
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 22, 2024
1 parent f0e2114 commit b1cdf00
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 87 deletions.
80 changes: 0 additions & 80 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

6 changes: 1 addition & 5 deletions .github/workflows/pr-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@ jobs:
cache: pipenv
- if: github.event_name != 'pull_request' || github.event.action != 'closed'
run: sed -i -e "s/python_version = \".*\"/python_version = \"$(echo ${{ steps.setup_python.outputs.python-version }} | sed -e 's/\([0-9]*\.[0-9]*\).*/\1/g')\"/g" Pipfile
- name: Install pipenv
id: install_pipenv
if: github.event_name != 'pull_request' || github.event.action != 'closed'
run: bash "${GITHUB_WORKSPACE}/scripts/pr_format/pr_format/install_pipenv.sh"
- name: Install dependencies
if: github.event_name != 'pull_request' || github.event.action != 'closed'
run: bash "${GITHUB_WORKSPACE}/scripts/pr_format/pr_format/pipenv_install.sh"
run: bash "${GITHUB_WORKSPACE}/scripts/pipenv_install.sh"
# formatする
# --exit-codeをつけることで、autopep8内でエラーが起きれば1、差分があれば2のエラーステータスコードが返ってくる。正常時は0が返る
- name: Format files
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ jobs:
python-version-file: .python-version
cache: pipenv
- name: Install pipenv
run: bash "${GITHUB_WORKSPACE}/scripts/pipenv_install.sh"
- name: Set venv path
env:
DEST_PATH: "/home/runner/work/_temp/_github_workflow/.venv"
run: bash "${GITHUB_WORKSPACE}/scripts/pr_test/pr_super_lint/install_pipenv.sh"
run: bash "${GITHUB_WORKSPACE}/scripts/pr_test/pr_super_lint/set_venv_path.sh"
- name: Set up Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pipenv==2024.0.1
5 changes: 5 additions & 0 deletions scripts/pipenv_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

pip install -r requirements.txt
pipenv --version
pipenv install --dev
8 changes: 7 additions & 1 deletion scripts/pr_test/pr_super_lint/set_venv_path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@
# 参考URL: https://bit.ly/2KJhjqk
venv_path=$(pipenv --venv)
echo "${venv_path}"
echo "venv_path=${venv_path}" >>"${GITHUB_ENV}"
VENV_PATH="${venv_path}"

# https://github.com/github/super-linter/issues/157#issuecomment-648850330
# -v "/home/runner/work/_temp/_github_workflow":"/github/workflow"
# ここに cp -r することで、super-linterのなかに.venvを配置できる
# また、元ディレクトリにも残っているので、キャッシュが作られる
cp -r "${VENV_PATH}" "${DEST_PATH}"

0 comments on commit b1cdf00

Please sign in to comment.