Testing usage #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration Tests | |
concurrency: | |
group: ${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- 'releases/*' | |
env: | |
version: '[10, 12, 14]' | |
os: '["ubuntu-latest", "windows-latest"]' | |
jobs: | |
build-matrix: | |
name: Build Matrix values | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.test.outputs.json }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Testing usage | |
id: test | |
uses: ./ # local - nickofthyme/object-remap@HEAD | |
with: | |
os: ${{ env.os }} | |
version: ${{ env.version }} | |
# You can even add additional parameters with include as defined in the docs | |
# See example at https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude | |
# include: '[{ "color": "green" }]' | |
- name: Dump matrix content | |
env: | |
NP_MATRIX: ${{ toJson(steps.test.outputs.json) }} | |
run: echo "$NP_MATRIX" | |
test-matrix: | |
name: "Test Action with Matrix (os: ${{ matrix.os }}, version: ${{ matrix.version }})" | |
runs-on: ubuntu-latest | |
needs: build-matrix | |
strategy: | |
matrix: ${{ fromJSON(needs.build-matrix.outputs.matrix) }} | |
steps: | |
- name: Dump matrix context | |
env: | |
MATRIX_CONTEXT: ${{ toJson(matrix) }} | |
run: echo "$MATRIX_CONTEXT" |