Skip to content

Commit

Permalink
only create requirements.txt on demand
Browse files Browse the repository at this point in the history
  • Loading branch information
Der-Henning committed Jul 28, 2023
1 parent e1fde61 commit 3ce8ce0
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 250 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Allow files and directories
!/docker
!/requirements.txt
!/tgtg_scanner
!/pyproject.toml
!/poetry.lock
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- v*
pull_request:

env:
PYTHON_VERSION: 3.10
POETRY_VERSION: 1.5.1

jobs:
docker-images:
name: Build Docker Images
Expand All @@ -26,6 +30,13 @@ jobs:
context: ./
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: $PYTHON_VERSION
- name: Setup Poetry
run: pip install --upgrade pip setuptools wheel poetry==$POETRY_VERSION
- name: Export requirements.txt
run: poetry export -f requirements.txt --output requirements.txt
- uses: docker/metadata-action@v4
id: meta
with:
Expand Down Expand Up @@ -77,9 +88,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: $PYTHON_VERSION
- name: Setup Poetry
run: pip install --upgrade pip setuptools wheel poetry==1.5.1
run: pip install --upgrade pip setuptools wheel poetry==$POETRY_VERSION
- name: Install dependencies
run: poetry install --without test
- name: Run PyInstaller
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Tests
on:
pull_request:

env:
POETRY_VERSION: 1.5.1

jobs:
tests:
name: Run Tests
Expand All @@ -18,7 +21,7 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: Setup Poetry
run: pip install --upgrade pip setuptools wheel poetry==1.5.1
run: pip install --upgrade pip setuptools wheel poetry==$POETRY_VERSION
- name: Install dependencies
run: poetry install --without build
- name: Run linting
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/tgtg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
schedule:
- cron: 0 1 * * *

env:
PYTHON_VERSION: 3.10
POETRY_VERSION: 1.5.1

jobs:
test:
name: Run Test
Expand All @@ -12,9 +16,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: $PYTHON_VERSION
- name: Setup Poetry
run: pip install --upgrade pip setuptools wheel poetry==1.5.1
run: pip install --upgrade pip setuptools wheel poetry==$POETRY_VERSION
- name: Install dependencies
run: poetry install --without build
- name: Run tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dist
.coverage
coverage.xml
.pytest_cache
requirements.txt

.env
config.ini
Expand Down
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,3 @@ repos:
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args: [-f, requirements.txt, -o, ./docker/requirements.txt]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
images:
poetry export -f requirements.txt --output ./docker/requirements.txt
poetry export -f requirements.txt --output requirements.txt
docker build -f ./docker/Dockerfile -t tgtg-scanner:latest .
docker build -f ./docker/Dockerfile.alpine -t tgtg-scanner:latest-alpine .

Expand Down
242 changes: 0 additions & 242 deletions docker/requirements.txt

This file was deleted.

0 comments on commit 3ce8ce0

Please sign in to comment.