|
| 1 | +name: "PR - Test Updated Features (arm64)" |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + # NOTE: To extend this workflow to other features, add path entries below |
| 5 | + # following the same pattern, e.g.: |
| 6 | + # - "src/<feature-name>/**" |
| 7 | + # - "test/<feature-name>/**" |
| 8 | + paths: |
| 9 | + - "src/powershell/**" |
| 10 | + - "test/powershell/**" |
| 11 | + |
| 12 | +jobs: |
| 13 | + detect-changes: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + outputs: |
| 16 | + features: ${{ steps.filter.outputs.changes }} |
| 17 | + steps: |
| 18 | + - uses: dorny/paths-filter@v3 |
| 19 | + id: filter |
| 20 | + with: |
| 21 | + # NOTE: To extend this workflow to other features, add filter entries below |
| 22 | + # following the same pattern, e.g.: |
| 23 | + # <feature-name>: ./**/<feature-name>/** |
| 24 | + filters: | |
| 25 | + powershell: ./**/powershell/** |
| 26 | +
|
| 27 | + test: |
| 28 | + needs: [detect-changes] |
| 29 | + runs-on: ubuntu-24.04-arm |
| 30 | + continue-on-error: true |
| 31 | + strategy: |
| 32 | + matrix: |
| 33 | + features: ${{ fromJSON(needs.detect-changes.outputs.features) }} |
| 34 | + baseImage: |
| 35 | + [ |
| 36 | + "ubuntu:focal", |
| 37 | + "ubuntu:jammy", |
| 38 | + "debian:11", |
| 39 | + "debian:12", |
| 40 | + "mcr.microsoft.com/devcontainers/base:ubuntu", |
| 41 | + "mcr.microsoft.com/devcontainers/base:debian", |
| 42 | + "mcr.microsoft.com/devcontainers/base:noble" |
| 43 | + ] |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v4 |
| 46 | + |
| 47 | + - name: "Install latest devcontainer CLI" |
| 48 | + run: npm install -g @devcontainers/cli |
| 49 | + |
| 50 | + - name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'" |
| 51 | + run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} . |
| 52 | + |
| 53 | + test-scenarios: |
| 54 | + needs: [detect-changes] |
| 55 | + runs-on: ubuntu-24.04-arm |
| 56 | + continue-on-error: true |
| 57 | + strategy: |
| 58 | + matrix: |
| 59 | + features: ${{ fromJSON(needs.detect-changes.outputs.features) }} |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v4 |
| 62 | + |
| 63 | + - name: "Install latest devcontainer CLI" |
| 64 | + run: npm install -g @devcontainers/cli |
| 65 | + |
| 66 | + - name: "Testing '${{ matrix.features }}' scenarios" |
| 67 | + run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated . |
0 commit comments