Skip to content

Commit 3ce8ce0

Browse files
committed
only create requirements.txt on demand
1 parent e1fde61 commit 3ce8ce0

File tree

8 files changed

+26
-250
lines changed

8 files changed

+26
-250
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# Allow files and directories
55
!/docker
6+
!/requirements.txt
67
!/tgtg_scanner
78
!/pyproject.toml
89
!/poetry.lock

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
- v*
99
pull_request:
1010

11+
env:
12+
PYTHON_VERSION: 3.10
13+
POETRY_VERSION: 1.5.1
14+
1115
jobs:
1216
docker-images:
1317
name: Build Docker Images
@@ -26,6 +30,13 @@ jobs:
2630
context: ./
2731
steps:
2832
- uses: actions/checkout@v3
33+
- uses: actions/setup-python@v4
34+
with:
35+
python-version: $PYTHON_VERSION
36+
- name: Setup Poetry
37+
run: pip install --upgrade pip setuptools wheel poetry==$POETRY_VERSION
38+
- name: Export requirements.txt
39+
run: poetry export -f requirements.txt --output requirements.txt
2940
- uses: docker/metadata-action@v4
3041
id: meta
3142
with:
@@ -77,9 +88,9 @@ jobs:
7788
- uses: actions/checkout@v3
7889
- uses: actions/setup-python@v4
7990
with:
80-
python-version: '3.10'
91+
python-version: $PYTHON_VERSION
8192
- name: Setup Poetry
82-
run: pip install --upgrade pip setuptools wheel poetry==1.5.1
93+
run: pip install --upgrade pip setuptools wheel poetry==$POETRY_VERSION
8394
- name: Install dependencies
8495
run: poetry install --without test
8596
- name: Run PyInstaller

.github/workflows/tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Tests
33
on:
44
pull_request:
55

6+
env:
7+
POETRY_VERSION: 1.5.1
8+
69
jobs:
710
tests:
811
name: Run Tests
@@ -18,7 +21,7 @@ jobs:
1821
with:
1922
python-version: ${{ matrix.python }}
2023
- name: Setup Poetry
21-
run: pip install --upgrade pip setuptools wheel poetry==1.5.1
24+
run: pip install --upgrade pip setuptools wheel poetry==$POETRY_VERSION
2225
- name: Install dependencies
2326
run: poetry install --without build
2427
- name: Run linting

.github/workflows/tgtg.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
schedule:
55
- cron: 0 1 * * *
66

7+
env:
8+
PYTHON_VERSION: 3.10
9+
POETRY_VERSION: 1.5.1
10+
711
jobs:
812
test:
913
name: Run Test
@@ -12,9 +16,9 @@ jobs:
1216
- uses: actions/checkout@v3
1317
- uses: actions/setup-python@v4
1418
with:
15-
python-version: '3.10'
19+
python-version: $PYTHON_VERSION
1620
- name: Setup Poetry
17-
run: pip install --upgrade pip setuptools wheel poetry==1.5.1
21+
run: pip install --upgrade pip setuptools wheel poetry==$POETRY_VERSION
1822
- name: Install dependencies
1923
run: poetry install --without build
2024
- name: Run tests

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dist
88
.coverage
99
coverage.xml
1010
.pytest_cache
11+
requirements.txt
1112

1213
.env
1314
config.ini

.pre-commit-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,3 @@ repos:
5252
hooks:
5353
- id: poetry-check
5454
- id: poetry-lock
55-
- id: poetry-export
56-
args: [-f, requirements.txt, -o, ./docker/requirements.txt]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
images:
2-
poetry export -f requirements.txt --output ./docker/requirements.txt
2+
poetry export -f requirements.txt --output requirements.txt
33
docker build -f ./docker/Dockerfile -t tgtg-scanner:latest .
44
docker build -f ./docker/Dockerfile.alpine -t tgtg-scanner:latest-alpine .
55

docker/requirements.txt

Lines changed: 0 additions & 242 deletions
This file was deleted.

0 commit comments

Comments
 (0)