Skip to content

[noticket] Add test workflow #17

[noticket] Add test workflow

[noticket] Add test workflow #17

Workflow file for this run

name: Test examples
on:
pull_request:
# paths:
# - modules/**
# - devenv.nix
# - devenv.yaml
push:
branches:
- main
- integration
- feature/**
- hotfix/**
paths:
- modules/**
- devenv.nix
- devenv.yaml
env:
DEVENV_TESTING_VERSION: v0.6.3
jobs:
test_examples:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
# - uses: cachix/install-nix-action@v22
# - uses: cachix/cachix-action@v12
# with:
# name: devenv
- name: Install devenv.sh
run: |
nix profile install --accept-flake-config tarball+https://install.devenv.sh/${DEVENV_TESTING_VERSION}
shell: sh
- name: Test SW6 example
run: |
echo running on branch ${GITHUB_REF_NAME}
cd examples/sw6
echo
sed -i "s/ref=v1.0.0/ref=${GITHUB_REF_NAME}/g" devenv.yaml
cat devenv.yaml
devenv ci -vvv
devenv shell echo ok
- name: Test SW5 example
run: |
echo running on branch ${GITHUB_REF_NAME}
cd examples/sw5
sed -i "s/ref=v1.0.0/ref=${GITHUB_REF_NAME}/g" devenv.yaml
devenv ci -vvv
devenv shell echo ok