lix-install-action/.github/workflows/ci.yml

135 lines
3.9 KiB
YAML
Raw Normal View History

2023-01-13 18:07:57 +00:00
name: CI
on:
pull_request:
push:
branches: [main]
jobs:
run-x86_64-linux:
name: Run x86_64 Linux
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
2023-01-13 18:13:23 +00:00
- name: Install Nix
2023-01-13 18:07:57 +00:00
uses: ./
with:
logger: pretty
log-directives: nix_installer=trace
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: echo $PATH
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: |
nix run nixpkgs#fortune
nix profile install nixpkgs#fortune
fortune
nix store gc
nix run nixpkgs#fortune
- name: Test bash
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
shell: bash --login {0}
- name: Test sh
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
shell: sh -l {0}
2023-01-13 20:09:36 +00:00
- name: Install Nix again (noop)
uses: ./
with:
logger: pretty
log-directives: nix_installer=trace
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
2023-01-13 20:18:14 +00:00
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: |
nix run nixpkgs#fortune
nix profile install nixpkgs#fortune
fortune
nix store gc
nix run nixpkgs#fortune
2023-01-13 20:09:36 +00:00
- name: Reinstall Nix
uses: ./
with:
logger: pretty
log-directives: nix_installer=trace
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
reinstall: true
2023-01-13 20:18:14 +00:00
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: |
nix run nixpkgs#fortune
nix profile install nixpkgs#fortune
fortune
nix store gc
nix run nixpkgs#fortune
2023-01-13 18:07:57 +00:00
run-x86_64-darwin:
name: Run x86_64 Darwin
runs-on: macos-12
steps:
- uses: actions/checkout@v3
2023-01-13 18:13:23 +00:00
- name: Install Nix
2023-01-13 18:07:57 +00:00
uses: ./
with:
logger: pretty
log-directives: nix_installer=trace
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: echo $PATH
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: |
nix run nixpkgs#fortune
nix profile install nixpkgs#fortune
fortune
nix store gc
nix run nixpkgs#fortune
- name: Test bash
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
shell: bash --login {0}
- name: Test sh
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
shell: sh -l {0}
- name: Test zsh
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
shell: zsh --login --interactive {0}
2023-01-13 20:09:36 +00:00
- name: Install Nix again (noop)
uses: ./
with:
logger: pretty
log-directives: nix_installer=trace
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
2023-01-13 20:18:14 +00:00
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: |
nix run nixpkgs#fortune
nix profile install nixpkgs#fortune
fortune
nix store gc
nix run nixpkgs#fortune
2023-01-13 20:09:36 +00:00
- name: Reinstall Nix
uses: ./
with:
logger: pretty
log-directives: nix_installer=trace
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
reinstall: true
2023-01-13 20:18:14 +00:00
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: |
nix run nixpkgs#fortune
nix profile install nixpkgs#fortune
fortune
nix store gc
nix run nixpkgs#fortune