Skip to content

Add devenv template #40

Add devenv template

Add devenv template #40

Workflow file for this run

name: CI
on: push
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
templates:
strategy:
matrix:
template:
- name: default
command: python --version
- name: devenv
command: python --version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- run: sed -i 's/github:sestrella\/asdf2nix/github:sestrella\/asdf2nix\/${{ github.sha }}/g' templates/*/flake.nix
- run: echo "tmpdir=$(mktemp -d)" >> "$GITHUB_OUTPUT"
id: mktemp
- run: nix flake init -t ${{ github.workspace }}#${{ matrix.template.name }}
working-directory: ${{ steps.mktemp.outputs.tmpdir }}
- run: nix develop --accept-flake-config -c ${{ matrix.template.command }}
working-directory: ${{ steps.mktemp.outputs.tmpdir }}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- run: nix eval --impure .#tests
working-directory: tests