Skip to content

Commit 8e128ec

Browse files
authored
Merge pull request #623 from TypedDevs/ci/speedup-windows
ci: speed up test workflows on PRs
2 parents b0a3e79 + 3745c0c commit 8e128ec

3 files changed

Lines changed: 52 additions & 5 deletions

File tree

.github/workflows/tests-bash-3.0.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@ name: Bash 3.0 Compatibility
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- 'docs/**'
7+
- 'adrs/**'
8+
- '**/*.md'
9+
- '.github/ISSUE_TEMPLATE/**'
10+
- '.github/PULL_REQUEST_TEMPLATE.md'
511
push:
612
branches:
713
- main
814

15+
concurrency:
16+
group: bash3-${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
18+
919
jobs:
1020
build-image:
1121
name: "Build Bash 3.0 Image"

.github/workflows/tests.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@ name: Tests
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- 'docs/**'
7+
- 'adrs/**'
8+
- '**/*.md'
9+
- '.github/ISSUE_TEMPLATE/**'
10+
- '.github/PULL_REQUEST_TEMPLATE.md'
511
push:
612
branches:
713
- main
814

15+
concurrency:
16+
group: tests-${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
18+
919
jobs:
1020
ubuntu:
1121
name: "Ubuntu - latest"
@@ -88,10 +98,6 @@ jobs:
8898
strategy:
8999
matrix:
90100
include:
91-
- name: "acceptance a-l"
92-
test_path: "tests/acceptance/bashunit_[a-l]*_test.sh"
93-
- name: "acceptance m-z"
94-
test_path: "tests/acceptance/bashunit_[m-z]*_test.sh tests/acceptance/[i-p]*_test.sh"
95101
- name: functional
96102
test_path: "tests/functional/*_test.sh"
97103
- name: "unit a-b"
@@ -118,7 +124,37 @@ jobs:
118124
- name: Run tests
119125
shell: bash
120126
run: |
121-
./bashunit --parallel ${{ matrix.test_path }}
127+
./bashunit --parallel --jobs 4 ${{ matrix.test_path }}
128+
129+
windows-acceptance:
130+
name: "On windows (${{ matrix.name }})"
131+
if: github.event_name == 'push'
132+
timeout-minutes: 10
133+
runs-on: windows-latest
134+
strategy:
135+
matrix:
136+
include:
137+
- name: "acceptance a-e"
138+
test_path: "tests/acceptance/bashunit_[a-e]*_test.sh"
139+
- name: "acceptance f-l"
140+
test_path: "tests/acceptance/bashunit_[f-l]*_test.sh"
141+
- name: "acceptance m-z"
142+
test_path: "tests/acceptance/bashunit_[m-z]*_test.sh tests/acceptance/[i-p]*_test.sh"
143+
fail-fast: false
144+
steps:
145+
- name: Checkout code
146+
uses: actions/checkout@v4
147+
with:
148+
fetch-depth: 1
149+
150+
- name: Setup Config
151+
shell: bash
152+
run: cp .env.example .env
153+
154+
- name: Run tests
155+
shell: bash
156+
run: |
157+
./bashunit --parallel --jobs 4 ${{ matrix.test_path }}
122158
123159
alpine:
124160
name: "On alpine-latest"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ dev.log
2727
.tasks/
2828
.claude/settings.local.json
2929
.claude/plans/
30+
.claude/scheduled_tasks.lock

0 commit comments

Comments
 (0)