Skip to content

Merge pull request #83 from M-arcus/port-config #113

Merge pull request #83 from M-arcus/port-config

Merge pull request #83 from M-arcus/port-config #113

Workflow file for this run

name: Test examples
on:
pull_request:
branches:
- main
- release/**
push:
paths:
- .github/workflows/test_examples.yml
- examples/**
- modules/**
- devenv.nix
- devenv.yaml
env:
DEVENV_VERSION: v0.6.3
jobs:
list-examples:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- id: set-matrix
run: echo "matrix=$(ls ${GITHUB_WORKSPACE}/examples/ | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
test_examples:
needs: list-examples
runs-on: ubuntu-latest
strategy:
matrix:
manifest: ${{ fromJson(needs.list-examples.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- uses: cachix/cachix-action@v12
with:
name: devenv
- name: Install direnv
run: sudo apt update && sudo apt install direnv
- name: Install devenv.sh
run: nix profile install --accept-flake-config tarball+https://install.devenv.sh/${DEVENV_VERSION}
shell: sh
- name: Test ${{ matrix.manifest }} example
run: |
cd ${GITHUB_WORKSPACE}/examples/${{ matrix.manifest }}
sed -i "s,url: github:kellerkinderDE/devenv-shopware?ref=v2.0.0,url: path:${GITHUB_WORKSPACE}," devenv.yaml
echo running on ${GITHUB_REPOSITORY} with ref ${GITHUB_REF_NAME}
direnv allow && direnv reload
devenv ci -vvv
devenv shell echo ok