Skip to content

Commit c0f051b

Browse files
Merge pull request #345 from tillahoffmann/win-requirements
Build requirements for `windows-latest` machine and `macos-latest`.
2 parents 813328f + 920699c commit c0f051b

File tree

9 files changed

+65
-52
lines changed

9 files changed

+65
-52
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
with:
1616
python-version: "3.10"
1717
cache: pip
18-
cache-dependency-path: requirements/3.10.txt
18+
cache-dependency-path: requirements/ubuntu-latest-3.10.txt
1919
- name: Install Python dependencies
2020
run: |
2121
pip install --upgrade pip
22-
pip install -r requirements/3.10.txt
22+
pip install -r requirements/ubuntu-latest-3.10.txt
2323
- name: Build documentation
2424
run: make docs

.github/workflows/main.yml

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,54 @@ jobs:
99
build:
1010
strategy:
1111
matrix:
12-
python-version:
13-
- "3.7"
14-
- "3.8"
15-
- "3.9"
16-
- "3.10"
17-
- "3.11"
12+
runtime:
13+
- machine: ubuntu-latest
14+
python-version: "3.7"
15+
- machine: ubuntu-latest
16+
python-version: "3.8"
17+
- machine: ubuntu-latest
18+
python-version: "3.9"
19+
- machine: ubuntu-latest
20+
python-version: "3.10"
21+
- machine: ubuntu-latest
22+
python-version: "3.11"
1823
component:
19-
- arangodb
20-
- azurite
21-
- clickhouse
22-
- compose
23-
- core
24-
- elasticsearch
25-
- google
26-
- kafka
27-
- keycloak
28-
- localstack
29-
- meta
30-
- minio
31-
- mongodb
32-
- mssql
33-
- mysql
34-
- neo4j
35-
- nginx
36-
- opensearch
37-
- oracle
38-
- postgres
39-
- rabbitmq
40-
- redis
41-
- selenium
42-
runs-on: ubuntu-latest
24+
- arangodb
25+
- azurite
26+
- clickhouse
27+
- compose
28+
- core
29+
- elasticsearch
30+
- google
31+
- kafka
32+
- keycloak
33+
- localstack
34+
- meta
35+
- minio
36+
- mongodb
37+
- mssql
38+
- mysql
39+
- neo4j
40+
- nginx
41+
- opensearch
42+
- oracle
43+
- postgres
44+
- rabbitmq
45+
- redis
46+
- selenium
47+
runs-on: ${{ matrix.runtime.machine }}
4348
steps:
4449
- uses: actions/checkout@v3
45-
- name: Setup python ${{ matrix.python-version }}
50+
- name: Setup python ${{ matrix.runtime.python-version }}
4651
uses: actions/setup-python@v4
4752
with:
48-
python-version: ${{ matrix.python-version }}
53+
python-version: ${{ matrix.runtime.python-version }}
4954
cache: pip
50-
cache-dependency-path: ${{ format('requirements/{0}.txt', matrix.python-version) }}
55+
cache-dependency-path: ${{ format('requirements/{0}-{1}.txt', matrix.runtime.machine, matrix.runtime.python-version) }}
5156
- name: Install Python dependencies
5257
run: |
5358
pip install --upgrade pip
54-
pip install -r requirements/${{ matrix.python-version }}.txt
59+
pip install -r requirements/${{ matrix.runtime.machine }}-${{ matrix.runtime.python-version }}.txt
5560
- name: Run docker diagnostics
5661
if: matrix.component == 'core'
5762
run: |
@@ -78,7 +83,8 @@ jobs:
7883
github.event_name == 'push'
7984
&& github.ref == 'refs/heads/main'
8085
&& github.repository_owner == 'testcontainers'
81-
&& matrix.python-version == '3.10'
86+
&& matrix.runtime.python-version == '3.10'
87+
&& matrix.runtime.machine == 'ubuntu-latest'
8288
env:
8389
TWINE_USERNAME: __token__
8490
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

.github/workflows/requirements.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,34 @@ jobs:
99
requirements:
1010
strategy:
1111
matrix:
12-
python-version:
13-
- "3.7"
14-
- "3.8"
15-
- "3.9"
16-
- "3.10"
17-
- "3.11"
18-
runs-on: ubuntu-latest
12+
runtime:
13+
- machine: ubuntu-latest
14+
python-version: "3.7"
15+
- machine: ubuntu-latest
16+
python-version: "3.8"
17+
- machine: ubuntu-latest
18+
python-version: "3.9"
19+
- machine: ubuntu-latest
20+
python-version: "3.10"
21+
- machine: ubuntu-latest
22+
python-version: "3.11"
23+
- machine: windows-latest
24+
python-version: "3.10"
25+
- machine: macos-latest
26+
python-version: "3.10"
27+
runs-on: ${{ matrix.runtime.machine }}
1928
steps:
2029
- uses: actions/checkout@v3
21-
- name: Setup python ${{ matrix.python-version }}
30+
- name: Setup python ${{ matrix.runtime.python-version }}
2231
uses: actions/setup-python@v4
2332
with:
24-
python-version: ${{ matrix.python-version }}
33+
python-version: ${{ matrix.runtime.python-version }}
2534
- name: Update pip and install pip-tools
2635
run: pip install --upgrade pip pip-tools
2736
- name: Build requirements
28-
run: |
29-
rm requirements/${{ matrix.python-version }}.txt
30-
pip-compile --resolver=backtracking -v --upgrade -o requirements/${{ matrix.python-version }}.txt
37+
run: pip-compile --resolver=backtracking -v --upgrade -o requirements.txt
3138
- name: Store requirements as artifact
3239
uses: actions/upload-artifact@v3
3340
with:
34-
name: requirements-${{ matrix.python-version }}.txt
35-
path: requirements/${{ matrix.python-version }}.txt
41+
name: requirements-${{ matrix.runtime.machine }}-${{ matrix.runtime.python-version }}.txt
42+
path: requirements.txt

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PYTHON_VERSIONS = 3.7 3.8 3.9 3.10 3.11
22
PYTHON_VERSION ?= 3.10
33
IMAGE = testcontainers-python:${PYTHON_VERSION}
4-
REQUIREMENTS = $(addprefix requirements/,${PYTHON_VERSIONS:=.txt})
4+
REQUIREMENTS = $(addprefix requirements/ubuntu-latest-,${PYTHON_VERSIONS:=.txt})
55
RUN = docker run --rm -it
66
# Get all directories that contain a setup.py and get the directory name.
77
PACKAGES = $(subst /,,$(dir $(wildcard */setup.py)))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)