mirror of
https://git.madhouse-project.org/actions/nix.git
synced 2025-01-18 16:41:31 +01:00
63e7eb4047
There's a valid use case for wanting to run `nix develop` without executing anything: to get the dependencies installed. This way the output of future steps will have considerably cleaner, more relevant outputs. Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
38 lines
797 B
YAML
38 lines
797 B
YAML
---
|
|
name: test nix/develop
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
nix/develop:
|
|
runs-on: nixos-flakes
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: run a command within a dev environment
|
|
uses: ./develop
|
|
with:
|
|
flake: ./develop/test
|
|
package: "hello"
|
|
run: |
|
|
hello
|
|
|
|
- name: run multiple commands within a dev environment
|
|
uses: ./develop
|
|
with:
|
|
flake: ./develop/test
|
|
package: "hello"
|
|
run: |
|
|
gcc --version
|
|
hello
|
|
if [ -n "${CI}" ]; then
|
|
echo "I'm running in CI!"
|
|
fi
|
|
|
|
- name: no commands should still work
|
|
uses: ./develop
|
|
with:
|
|
flake: ./develop/test
|
|
package: "hello"
|