mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
Simplify Matrix decode, add defaults for fail-fast and max-parallel, add test (#763)
* fix[workflow]: multiple fixes for workflow/matrix fix[workflow]: default `max-parallel` fix[workflow]: default `fail-fast`, it's `true`, not `false` fix[workflow]: skipping over the job when `strategy:` is defined but `matrix:` isn't (fixes #625) fix[workflow]: skip non-existing includes keys and hard fail on non-existing excludes keys fix[workflow]: simplify Matrix decode (because I "think" I know how `yaml` works) (fixes #760) fix[tests]: add test for planner and runner * fix(workflow): use yaml node for env key Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
65f74c5c50
commit
4eb45d4c4b
6 changed files with 237 additions and 73 deletions
50
act/model/testdata/strategy/push.yml
vendored
Normal file
50
act/model/testdata/strategy/push.yml
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
jobs:
|
||||
strategy-all:
|
||||
name: ${{ matrix.node-version }} | ${{ matrix.site }} | ${{ matrix.datacenter }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo 'Hello!'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
datacenter:
|
||||
- site-c
|
||||
- site-d
|
||||
exclude:
|
||||
- datacenter: site-d
|
||||
node-version: 14.x
|
||||
site: staging
|
||||
include:
|
||||
- php-version: 5.4
|
||||
- datacenter: site-a
|
||||
node-version: 10.x
|
||||
site: prod
|
||||
- datacenter: site-b
|
||||
node-version: 12.x
|
||||
site: dev
|
||||
node-version: [14.x, 16.x]
|
||||
site:
|
||||
- staging
|
||||
max-parallel: 2
|
||||
strategy-no-matrix:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo 'Hello!'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 2
|
||||
strategy-only-fail-fast:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo 'Hello!'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
strategy-only-max-parallel:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo 'Hello!'
|
||||
strategy:
|
||||
max-parallel: 2
|
||||
'on':
|
||||
push: null
|
Loading…
Add table
Add a link
Reference in a new issue