Merge pull request #90 from kellerkinderDE/feature/wiki-update #144
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.1.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 |