diff --git a/.github/workflows/documentation-ci.yaml b/.github/workflows/documentation-ci.yaml index cceca78..6f2cd81 100644 --- a/.github/workflows/documentation-ci.yaml +++ b/.github/workflows/documentation-ci.yaml @@ -18,8 +18,13 @@ jobs: with: fetch-depth: 0 + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: ">=1.18.0" + check-latest: true - name: Install Importer - run: brew install upsidr/tap/importer + run: go install github.com/upsidr/importer/cmd/importer@v0.1.4 - name: Run Importer against all *.md files run: find . -name '*.md' -exec importer update {} \; diff --git a/.github/workflows/issue-27.yaml b/.github/workflows/issue-27.yaml new file mode 100644 index 0000000..9e999d2 --- /dev/null +++ b/.github/workflows/issue-27.yaml @@ -0,0 +1,35 @@ +--- +name: Matrix Test + +on: + push: + branches: + - main + +jobs: + matrix-test: + runs-on: ubuntu-latest + strategy: + matrix: + m-abc: + - "a" + - "b" + - "c" + - "d" + - "e" + m-xyz: + - "x" + - "y" + - "z" + fail-fast: false + steps: + - run: | + echo "Running matrix based test" + echo + echo " m-abc: ${{ matrix.m-abc }}" + echo " m-xyz: ${{ matrix.m-xyz }}" + + # Below is for testing failure handling. Commented out for this. + + # Force fail if input is "a" and "z" + # if [[ ${{ matrix.m-abc }} == "a" && ${{ matrix.m-xyz }} == "z" ]]; then return 1; fi diff --git a/docs/action-usage.md b/docs/action-usage.md index 2cde7a5..e496754 100644 --- a/docs/action-usage.md +++ b/docs/action-usage.md @@ -74,4 +74,6 @@ Create a YAML file with just a single Importer Marker: With that, you can simply run `importer update FILENAME` to get the latest spec. You can also update the file used to specific branch or version. -### +### Use with matrix strategy + +Merge Gatekeeper supports the use of matrix strategy. If any of the job fails, Merge Gatekeeper will also fail. In case of a complex matrix setup where one entry is not going to be needed, you may need to tweak Merge Gatekeeper spec to ignore some errors.