generated from devcontainers-community/features-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.23 KB
/
test-features.yml
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
name: Test features
on:
push:
branches: "main"
paths:
- src/*/**
- test/*/**
- .github/workflows/test-features.yml
pull_request:
paths:
- src/*/**
- test/*/**
- .github/workflows/test-features.yml
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
list-features:
outputs:
relevant-features: ${{ steps.list-features.outputs.relevant-features }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: list-features
uses: devcontainers-community/list-features@v2
test-feature:
needs: list-features
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.list-features.outputs.relevant-features) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm install -g @devcontainers/cli
- name: devcontainer features test -f ${{ matrix.id }}
run: |
if [[ -e test/${{ matrix.id }}/test.sh ]]; then
devcontainer features test -f ${{ matrix.id }}
else
devcontainer features test -f ${{ matrix.id }} --skip-autogenerated
fi