Skip to content

Commit 91f5fe9

Browse files
committed
Rename action to druzsan/setup-matrix
1 parent 769c90f commit 91f5fe9

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Build matrix
1+
# Setup matrix
22

33
GitHub action to create reusable dynamic job matrices for your workflows.
44

@@ -10,29 +10,29 @@ The main goal of this action is to be as much compatible with built-in
1010
as possible and thus allow you a smooth transition in your workflow.
1111

1212
All given examples can be found as GitHub workflows in
13-
[this repository](https://github.com/druzsan/test-build-matrix).
13+
[this repository](https://github.com/druzsan/test-setup-matrix).
1414

1515
## Basic usage
1616

1717
```yaml
1818
jobs:
19-
# Build matrix
20-
build-matrix:
19+
# Setup matrix
20+
setup-matrix:
2121
runs-on: ubuntu-latest
2222
outputs:
23-
matrix: ${{ steps.build.outputs.matrix }}
23+
matrix: ${{ steps.setup-matrix.outputs.matrix }}
2424
steps:
25-
- id: build
26-
uses: druzsan/build-matrix@v1
25+
- id: setup-matrix
26+
uses: druzsan/setup-matrix@v1
2727
with:
2828
matrix: |
2929
os: ubuntu-latest windows-latest macos-latest,
3030
python-version: 3.8 3.9 3.10
3131
# Setup python and print version
3232
setup-python:
33-
needs: build-matrix
33+
needs: setup-matrix
3434
strategy:
35-
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
35+
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
3636
runs-on: ${{ matrix.os }}
3737
steps:
3838
- uses: actions/setup-python@v4
@@ -138,7 +138,7 @@ install python dependencies, check code quality and run unit tests.
138138

139139
```yaml
140140
jobs:
141-
# No matrix build
141+
# No matrix setup
142142
# Setup python environment and cache installed packages
143143
setup-python:
144144
strategy:
@@ -193,23 +193,23 @@ jobs:
193193

194194
```yaml
195195
jobs:
196-
# Build matrix
197-
build-matrix:
196+
# Setup matrix
197+
setup-matrix:
198198
runs-on: ubuntu-latest
199199
outputs:
200-
matrix: ${{ steps.build.outputs.matrix }}
200+
matrix: ${{ steps.setup-matrix.outputs.matrix }}
201201
steps:
202-
- id: build
203-
uses: druzsan/build-matrix@v1
202+
- id: setup-matrix
203+
uses: druzsan/setup-matrix@v1
204204
with:
205205
matrix: |
206206
os: ubuntu-latest windows-latest macos-latest,
207207
python-version: 3.8 3.9 3.10
208208
# Setup python environment and cache installed packages
209209
setup-python:
210-
needs: build-matrix
210+
needs: setup-matrix
211211
strategy:
212-
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
212+
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
213213
runs-on: ${{ matrix.os }}
214214
steps:
215215
- uses: actions/checkout@v3
@@ -220,9 +220,9 @@ jobs:
220220
- run: python -m pip install -r requirements.txt
221221
# Check code quality
222222
check-code:
223-
needs: [build-matrix, setup-python]
223+
needs: [setup-matrix, setup-python]
224224
strategy:
225-
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
225+
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
226226
runs-on: ${{ matrix.os }}
227227
steps:
228228
- uses: actions/checkout@v3
@@ -236,9 +236,9 @@ jobs:
236236
- run: pylint src
237237
# Test code
238238
unit-test:
239-
needs: [build-matrix, setup-python]
239+
needs: [setup-matrix, setup-python]
240240
strategy:
241-
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
241+
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
242242
runs-on: ${{ matrix.os }}
243243
steps:
244244
- uses: actions/checkout@v3
@@ -250,7 +250,7 @@ jobs:
250250
- run: python -m pytest
251251
```
252252

253-
### Build dynamic matrix
253+
### Setup dynamic matrix
254254

255255
Sometimes you need to run a job on different sets of configurations, depending
256256
on branch, triggering event etc.
@@ -260,7 +260,7 @@ on branch, triggering event etc.
260260

261261
```yaml
262262
jobs:
263-
# No matrix build
263+
# No matrix setup
264264
# Test code on a dev branch
265265
unit-test-dev:
266266
if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/v')
@@ -313,18 +313,18 @@ jobs:
313313

314314
```yaml
315315
jobs:
316-
# Build matrix
317-
build-matrix:
316+
# Setup matrix
317+
setup-matrix:
318318
runs-on: ubuntu-latest
319319
steps:
320320
- if: startsWith(github.ref, 'refs/tags/v')
321-
uses: druzsan/build-matrix@v1
321+
uses: druzsan/setup-matrix@v1
322322
with:
323323
matrix: |
324324
os: ubuntu-latest windows-latest macos-latest,
325325
python-version: 3.8 3.9 3.10
326326
- if: github.ref == 'refs/heads/main'
327-
uses: druzsan/build-matrix@v1
327+
uses: druzsan/setup-matrix@v1
328328
with:
329329
matrix: |
330330
os: ubuntu-latest,
@@ -333,7 +333,7 @@ jobs:
333333
os: windows-latest python-version: 3.8,
334334
os: macos-latest python-version: 3.8
335335
- if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/v')
336-
uses: druzsan/build-matrix@v1
336+
uses: druzsan/setup-matrix@v1
337337
with:
338338
matrix: |
339339
os: ubuntu-latest,
@@ -345,9 +345,9 @@ jobs:
345345
matrix: ${{ steps.set-matrix.outputs.matrix }}
346346
# Test code
347347
unit-test:
348-
needs: build-matrix
348+
needs: setup-matrix
349349
strategy:
350-
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
350+
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
351351
runs-on: ${{ matrix.os }}
352352
steps:
353353
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)