Skip to content

Automated documentation update #177

Automated documentation update

Automated documentation update #177

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
detect-changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
contents: read
outputs:
# JSON array of changed filters
changes: ${{ steps.filter.outputs.changes }}
steps:
# For pull requests it's not necessary to checkout the code
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: jannekem/run-python-script-action@v1
id: generate-changes
with:
script: |
import os
for folder in os.listdir('src'):
print(f"{folder}:")
print(f" - '**/{folder}/**'")
print(f" - '.github/workflows/test.yaml'")
- name: Paths Filter
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
${{ steps.generate-changes.outputs.stdout }}
test-autogenerated:
needs: detect-changes
runs-on: ubuntu-latest
continue-on-error: true
if: ${{ needs.detect-changes.outputs.changes != '[]' }}
strategy:
matrix:
features: ${{ fromJson(needs.detect-changes.outputs.changes) }}
baseImage:
- debian:latest
- ubuntu:latest
- mcr.microsoft.com/devcontainers/base:ubuntu
steps:
- uses: actions/checkout@v4
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .
test-scenarios:
needs: detect-changes
runs-on: ubuntu-latest
continue-on-error: true
if: ${{ needs.detect-changes.outputs.changes != '[]' }}
strategy:
matrix:
features: ${{ fromJson(needs.detect-changes.outputs.changes) }}
steps:
- uses: actions/checkout@v4
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: "Generating tests for '${{ matrix.features }}' scenarios"
run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated .
test-global:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: "Testing global scenarios"
run: devcontainer features test --global-scenarios-only .