Skip to content

Commit

Permalink
export_checkの削除とテストが失敗する原因の修正
Browse files Browse the repository at this point in the history
  • Loading branch information
FujisakiEx committed Jul 16, 2023
1 parent ab55baa commit 8a07612
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 32 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: test

env:
POETRY_VERSION: "1.3.1"

on:
push:
pull_request:
Expand Down Expand Up @@ -51,7 +48,7 @@ jobs:
diff -q requirements-dev.txt requirements-dev.txt.check || \
diff -q requirements-test.txt requirements-test.txt.check || \
diff -q requirements-license.txt requirements-license.txt.check > /dev/null
if [$? = 1]; then
if [ $? = 1 ]; then
echo "poetry export has some diff"
exit 1
fi
Expand Down
46 changes: 28 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/python-poetry/poetry
rev: '1.3.1'
hooks:
- id: poetry-export
name: poetry-export
args: ["--without-hashes", "-o", "requirements.txt" ]
- id: poetry-export
name: poetry-export-dev
args: ["--without-hashes", "--with", "dev", "-o", "requirements-dev.txt" ]
- id: poetry-export
name: poetry-export-test
args: ["--without-hashes", "--with", "test", "-o", "requirements-test.txt" ]
- id: poetry-export
name: poetry-export-license
args: ["--without-hashes", "--with", "license", "-o", "requirements-license.txt" ]
- repo: local
hooks:
- id: pysen-lint
Expand All @@ -25,8 +10,33 @@ repos:
types: [file, python]
stages: [push]
pass_filenames: false
- id: poetry-export-check
name: poetry-export-check
entry: python poetry_export_check.py
- id: pip-install
name: pip-install
entry: pip install -r requirements.txt
language: python
pass_filenames: false
stages: [commit]
- id: poetry-export
name: poetry-export
entry: poetry export --without-hashes -o requirements.txt
language: python
pass_filenames: false
stages: [commit]
- id: poetry-export-dev
name: poetry-export-dev
entry: poetry export --without-hashes --with dev -o requirements-dev.txt
language: python
pass_filenames: false
stages: [commit]
- id: poetry-export-test
name: poetry-export-test
entry: poetry export --without-hashes --with test -o requirements-test.txt
language: python
pass_filenames: false
stages: [commit]
- id: poetry-export-license
name: poetry-export-license
entry: poetry export --without-hashes --with license -o requirements-license.txt
language: python
pass_filenames: false
stages: [commit]
10 changes: 0 additions & 10 deletions poetry_export_check.py

This file was deleted.

0 comments on commit 8a07612

Please sign in to comment.