-
Notifications
You must be signed in to change notification settings - Fork 137
71 lines (62 loc) · 2.17 KB
/
Copy pathdevcontainer-feature-test.yaml
File metadata and controls
71 lines (62 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json
---
name: "Test dev container feature"
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths:
- "deploy/devcontainer-feature/**"
- ".github/workflows/devcontainer-feature-test.yaml"
branches:
- main
merge_group:
workflow_call:
jobs:
changes:
if: github.event_name == 'merge_group'
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47
with:
files: |
deploy/devcontainer-feature/**
.github/workflows/devcontainer-feature-test.yaml
test:
needs: changes
if: >-
github.event_name != 'merge_group' ||
needs.changes.outputs.should_run == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
baseImage:
- mcr.microsoft.com/devcontainers/base:ubuntu
- mcr.microsoft.com/devcontainers/base:debian
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: "Generating tests for Radius CLI (default) against '${{ matrix.baseImage }}'"
run: devcontainer features test --skip-scenarios -f radcli -i ${{ matrix.baseImage }} .
working-directory: ./deploy/devcontainer-feature
test-scenarios:
needs: changes
if: >-
github.event_name != 'merge_group' ||
needs.changes.outputs.should_run == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: "Generating tests for radcli scenarios"
run: devcontainer features test -f radcli --skip-autogenerated --skip-duplicated .
working-directory: ./deploy/devcontainer-feature