generated from devcontainers/template-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (60 loc) · 1.86 KB
/
test-pr.yaml
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
name: "Test Template & Features"
on:
pull_request:
workflow_dispatch:
jobs:
changes:
name: Detect changed features & templates
runs-on: ubuntu-latest
outputs:
templates: ${{ steps.templates.outputs.templates }}
features: ${{ steps.templates.outputs.features }}
steps:
- uses: actions/checkout@v3
name: pull branch
with:
fetch-depth: 0
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: find changed templates & features
id: templates
run: ./build.sh ListTemplatesAndFeatures -GithubOutput "$GITHUB_OUTPUT"
test-templates:
if: ${{ needs.changes.outputs.templates }}
needs: [changes]
name: "Test template: ${{ matrix.template }}"
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
template: ${{ fromJSON(needs.changes.outputs.templates) }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Node
uses: actions/setup-node@v3
- name: Install dev containers
run: npm install -g @devcontainers/cli
- name: Run test for '${{ matrix.template }}'
id: smoke_test
run: echo 'Hi man'
test-features:
if: ${{ needs.changes.outputs.features }}
needs: [changes]
name: "Test feature: ${{ matrix.feature }}"
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
feature: ${{ fromJSON(needs.changes.outputs.features) }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Node
uses: actions/setup-node@v3
- name: Install dev containers
run: npm install -g @devcontainers/cli
- name: Run test for '${{ matrix.feature }}'
id: smoke_test
run: ./build.sh TestFeature -Feature '${{ matrix.feature }}'