Skip to content

Commit 35136e1

Browse files
committed
feat: containerized apps
1 parent 2a1f1d8 commit 35136e1

File tree

1 file changed

+99
-66
lines changed

1 file changed

+99
-66
lines changed

.github/workflows/test.yml

Lines changed: 99 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,89 +3,122 @@ name: Test
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
test-package:
77
name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }})
88
runs-on: ubuntu-latest
99
strategy:
1010
fail-fast: false
1111
matrix:
1212
python-version:
13-
- '3.8'
14-
- '3.9'
15-
- '3.10'
16-
- '3.11'
17-
- '3.12'
13+
- "3.8"
14+
- "3.9"
15+
- "3.10"
16+
- "3.11"
17+
- "3.12"
1818
django-version:
19-
- '3.2'
20-
- '4.0'
21-
- '4.1'
22-
- '4.2'
23-
- '5.0'
24-
- 'main'
19+
- "3.2"
20+
- "4.0"
21+
- "4.1"
22+
- "4.2"
23+
- "5.0"
24+
- "main"
2525
exclude:
2626
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
2727

2828
# < Python 3.10 is not supported by Django 5.0+
29-
- python-version: '3.8'
30-
django-version: '5.0'
31-
- python-version: '3.9'
32-
django-version: '5.0'
33-
- python-version: '3.8'
34-
django-version: 'main'
35-
- python-version: '3.9'
36-
django-version: 'main'
29+
- python-version: "3.8"
30+
django-version: "5.0"
31+
- python-version: "3.9"
32+
django-version: "5.0"
33+
- python-version: "3.8"
34+
django-version: "main"
35+
- python-version: "3.9"
36+
django-version: "main"
3737

3838
# Python 3.12 is not supported by Django < 5.0
39-
- python-version: '3.12'
40-
django-version: '3.2'
41-
- python-version: '3.12'
42-
django-version: '4.0'
43-
- python-version: '3.12'
44-
django-version: '4.1'
45-
- python-version: '3.12'
46-
django-version: '4.2'
39+
- python-version: "3.12"
40+
django-version: "3.2"
41+
- python-version: "3.12"
42+
django-version: "4.0"
43+
- python-version: "3.12"
44+
django-version: "4.1"
45+
- python-version: "3.12"
46+
django-version: "4.2"
4747

4848
steps:
49-
- uses: actions/checkout@v4
50-
51-
- name: Set up Python ${{ matrix.python-version }}
52-
uses: actions/setup-python@v4
53-
with:
54-
python-version: ${{ matrix.python-version }}
55-
56-
57-
- name: Get pip cache dir
58-
id: pip-cache
59-
run: |
60-
echo "::set-output name=dir::$(pip cache dir)"
61-
62-
- name: Cache
63-
uses: actions/cache@v3
64-
with:
65-
path: ${{ steps.pip-cache.outputs.dir }}
66-
key:
67-
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
68-
restore-keys: |
69-
${{ matrix.python-version }}-v1-
70-
71-
- name: Install Python dependencies
72-
run: |
73-
python -m pip install --upgrade pip
74-
python -m pip install --upgrade tox tox-gh-actions
75-
76-
- name: Tox tests
77-
run: |
78-
tox -v
79-
env:
80-
DJANGO: ${{ matrix.django-version }}
81-
82-
- name: Upload coverage
83-
uses: codecov/codecov-action@v3
84-
with:
85-
name: Python ${{ matrix.python-version }}
49+
- uses: actions/checkout@v4
50+
51+
- name: Set up Python ${{ matrix.python-version }}
52+
uses: actions/setup-python@v4
53+
with:
54+
python-version: ${{ matrix.python-version }}
55+
56+
- name: Get pip cache dir
57+
id: pip-cache
58+
run: |
59+
echo "::set-output name=dir::$(pip cache dir)"
60+
61+
- name: Cache
62+
uses: actions/cache@v3
63+
with:
64+
path: ${{ steps.pip-cache.outputs.dir }}
65+
key: ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
66+
restore-keys: |
67+
${{ matrix.python-version }}-v1-
68+
69+
- name: Install Python dependencies
70+
run: |
71+
python -m pip install --upgrade pip
72+
python -m pip install --upgrade tox tox-gh-actions
73+
74+
- name: Tox tests
75+
run: |
76+
tox -v
77+
env:
78+
DJANGO: ${{ matrix.django-version }}
79+
80+
- name: Upload coverage
81+
uses: codecov/codecov-action@v3
82+
with:
83+
name: Python ${{ matrix.python-version }}
84+
85+
test-rp:
86+
name: Test RP
87+
needs: test-package
88+
runs-on: ubuntu-latest
89+
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
node-version:
94+
- "16.x"
95+
- "18.x"
96+
- "20.x"
97+
steps:
98+
- name: Checkout
99+
uses: actions/checkout@v4
100+
101+
- name: Set up NodeJS
102+
uses: actions/setup-node@v2
103+
with:
104+
node-version: ${{ matrix.node-version }}
105+
106+
- name: Install dependencies
107+
run: npm install
108+
working-directory: test/app/rp
109+
110+
- name: Run Lint
111+
run: npm run lint
112+
working-directory: test/app/rp
113+
114+
- name: Run build
115+
run: npm run build
116+
working-directory: test/app/rp
86117

87118
success:
88-
needs: build
119+
needs:
120+
- test-package
121+
- test-rp
89122
runs-on: ubuntu-latest
90123
name: Test successful
91124
steps:

0 commit comments

Comments
 (0)