Skip to content

Commit b165b98

Browse files
author
Drew Yang
committed
ci: 🎨 split test and release ci
1 parent 3fcd16f commit b165b98

File tree

2 files changed

+59
-58
lines changed

2 files changed

+59
-58
lines changed

‎.github/workflows/development.yaml‎ renamed to ‎.github/workflows/release.yaml‎

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,9 @@
1-
name: Development
1+
name: Release
22
on:
3-
push:
4-
branches:
5-
- "**" # every branch
6-
- "!gh-pages" # exclude gh-pages branch
7-
- "!stage*" # exclude branches beginning with stage
8-
tags:
9-
- '\d+\.\d+\.\d+' # only semver tags
10-
pull_request:
11-
branches:
12-
- "**" # every branch
13-
- "!gh-pages" # exclude gh-pages branch
14-
- "!stage*" # exclude branches beginning with stage
3+
workflow_dispatch:
154
jobs:
16-
lint:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v3
20-
- uses: actions/setup-python@v3
21-
# enforce the same check as pre-commit
22-
# but only run important checks
23-
- uses: pre-commit/[email protected]
24-
with:
25-
extra_args: codespell --all-files
26-
- uses: pre-commit/[email protected]
27-
with:
28-
extra_args: black --all-files
29-
- uses: pre-commit/[email protected]
30-
with:
31-
extra_args: flake8 --all-files
32-
test:
33-
runs-on: ubuntu-latest
34-
needs: lint
35-
strategy:
36-
matrix:
37-
py_ver: ["3.9", "3.10", "3.11", "3.12", "3.13"]
38-
mysql_ver: ["8.0"]
39-
include:
40-
- py_ver: "3.9"
41-
mysql_ver: "5.7"
42-
steps:
43-
- uses: actions/checkout@v4
44-
- name: Set up Python ${{matrix.py_ver}}
45-
uses: actions/setup-python@v5
46-
with:
47-
python-version: ${{matrix.py_ver}}
48-
- name: Run primary tests
49-
env:
50-
PY_VER: ${{matrix.py_ver}}
51-
DJ_PASS: password
52-
MYSQL_VER: ${{matrix.mysql_ver}}
53-
DISTRO: alpine
54-
MINIO_VER: RELEASE.2021-09-03T03-56-13Z
55-
DOCKER_CLIENT_TIMEOUT: "120"
56-
COMPOSE_HTTP_TIMEOUT: "120"
57-
run: |
58-
export HOST_UID=$(id -u)
59-
docker compose --profile test up --quiet-pull --build --exit-code-from djtest djtest
605
build:
616
runs-on: ubuntu-latest
62-
needs: test
637
strategy:
648
matrix:
659
include:
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- "**" # every branch
6+
- "!gh-pages" # exclude gh-pages branch
7+
- "!stage*" # exclude branches beginning with stage
8+
pull_request:
9+
branches:
10+
- "**" # every branch
11+
- "!gh-pages" # exclude gh-pages branch
12+
- "!stage*" # exclude branches beginning with stage
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-python@v3
19+
# enforce the same check as pre-commit
20+
# but only run important checks
21+
- uses: pre-commit/[email protected]
22+
with:
23+
extra_args: codespell --all-files
24+
- uses: pre-commit/[email protected]
25+
with:
26+
extra_args: black --all-files
27+
- uses: pre-commit/[email protected]
28+
with:
29+
extra_args: flake8 --all-files
30+
test:
31+
runs-on: ubuntu-latest
32+
needs: lint
33+
strategy:
34+
matrix:
35+
py_ver: ["3.9", "3.10", "3.11", "3.12", "3.13"]
36+
mysql_ver: ["8.0"]
37+
include:
38+
- py_ver: "3.9"
39+
mysql_ver: "5.7"
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Set up Python ${{matrix.py_ver}}
43+
uses: actions/setup-python@v5
44+
with:
45+
python-version: ${{matrix.py_ver}}
46+
- name: Run primary tests
47+
env:
48+
PY_VER: ${{matrix.py_ver}}
49+
DJ_PASS: password
50+
MYSQL_VER: ${{matrix.mysql_ver}}
51+
DISTRO: alpine
52+
MINIO_VER: RELEASE.2021-09-03T03-56-13Z
53+
DOCKER_CLIENT_TIMEOUT: "120"
54+
COMPOSE_HTTP_TIMEOUT: "120"
55+
run: |
56+
export HOST_UID=$(id -u)
57+
docker compose --profile test up --quiet-pull --build --exit-code-from djtest djtest

0 commit comments

Comments
 (0)