Skip to content

CI - Test Features

CI - Test Features #75

Workflow file for this run

name: "CI - Test Features"
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- src/**
- test/**
- "!**.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-changes:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
outputs:
features: ${{ steps.filter.outputs.changes }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
golangci-lint: ./**/golangci-lint/**
gomarkdoc: ./**/gomarkdoc/**
goreleaser: ./**/goreleaser/**
gotestsum: ./**/gotestsum/**
just: ./**/just/**
mage: ./**/mage/**
pact-go: ./**/pact-go/**
vim: ./**/vim/**
test-features-changes:
needs:
- detect-changes
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
baseImage:
- mcr.microsoft.com/devcontainers/base:ubuntu
- mcr.microsoft.com/devcontainers/base:debian
- mcr.microsoft.com/devcontainers/base:alpine
- debian:stable-slim
- ubuntu:focal
- ubuntu:jammy
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-changes:
if: ${{ github.event_name == 'pull_request' }}
needs:
- detect-changes
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
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-all:
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features:
- golangci-lint
- gomarkdoc
- goreleaser
- gotestsum
- just
- mage
- pact-go
- vim
baseImage:
- mcr.microsoft.com/devcontainers/base:ubuntu
- mcr.microsoft.com/devcontainers/base:debian
- mcr.microsoft.com/devcontainers/base:alpine
- debian:stable-slim
- ubuntu:focal
- ubuntu:jammy
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-all-scenarios:
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features:
- golangci-lint
- gomarkdoc
- goreleaser
- gotestsum
- just
- mage
- pact-go
- vim
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 .