|
| 1 | +name: '🧪 Integration Test' |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + schedule: |
| 6 | + - cron: '0 6 * * *' |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +# This workflow serves for multiple purposes: |
| 10 | +# - Action integration test |
| 11 | +# - Usage example |
| 12 | + |
| 13 | +jobs: |
| 14 | + # Valid jobs |
| 15 | + setup-matrix-multi-line: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + outputs: |
| 18 | + matrix: ${{ steps.setup-matrix.outputs.matrix }} |
| 19 | + steps: |
| 20 | + - uses: druzsan/setup-matrix@feature/use-python-dockerfile |
| 21 | + with: |
| 22 | + matrix: | # Setup matrix with OS and Python version |
| 23 | + os: [ubuntu-latest, windows-latest] |
| 24 | + python-version: [3.8, 3.10, 3.12] |
| 25 | + include: |
| 26 | + - os: windows-latest |
| 27 | + python-version: 3.8 # Only use Python 3.8 for MacOS |
| 28 | + exclude: |
| 29 | + - os: windows-latest |
| 30 | + python-version: 3.12 # Do not use Python 3.12 for Windows |
| 31 | + setup-matrix-flow-syntax: |
| 32 | + runs-on: ubuntu-latest |
| 33 | + outputs: |
| 34 | + matrix: ${{ steps.setup-matrix.outputs.matrix }} |
| 35 | + steps: |
| 36 | + - uses: druzsan/setup-matrix@feature/use-python-dockerfile |
| 37 | + with: |
| 38 | + matrix: '{ os: [ubuntu-latest, windows-latest], python-version: [3.8, 3.10, 3.12] }' |
| 39 | + # Jobs expected to fail |
| 40 | + setup-matrix-empty: |
| 41 | + runs-on: ubuntu-latest |
| 42 | + outputs: |
| 43 | + matrix: ${{ steps.setup-matrix.outputs.matrix }} |
| 44 | + steps: |
| 45 | + - id: expected-to-fail |
| 46 | + uses: druzsan/setup-matrix@feature/use-python-dockerfile |
| 47 | + continue-on-error: true |
| 48 | + - if: steps.expected-to-fail.outcome != 'failure' |
| 49 | + run: echo "Step expected to fail didn't fail" && exit 1 |
| 50 | + setup-matrix-windows: |
| 51 | + runs-on: windows-latest |
| 52 | + steps: |
| 53 | + - id: expected-to-fail |
| 54 | + uses: druzsan/setup-matrix@feature/use-python-dockerfile |
| 55 | + with: |
| 56 | + matrix: '{ os: [ubuntu-latest, windows-latest], python-version: [3.8, 3.10, 3.12] }' |
| 57 | + continue-on-error: true |
| 58 | + - if: steps.expected-to-fail.outcome != 'failure' |
| 59 | + run: echo "Step expected to fail didn't fail" && exit 1 |
| 60 | + setup-matrix-macos: |
| 61 | + runs-on: macos-latest |
| 62 | + steps: |
| 63 | + - id: expected-to-fail |
| 64 | + uses: druzsan/setup-matrix@feature/use-python-dockerfile |
| 65 | + with: |
| 66 | + matrix: '{ os: [ubuntu-latest, windows-latest], python-version: [3.8, 3.10, 3.12] }' |
| 67 | + continue-on-error: true |
| 68 | + - if: steps.expected-to-fail.outcome != 'failure' |
| 69 | + run: echo "Step expected to fail didn't fail" && exit 1 |
0 commit comments