nix-on-droid/.github/workflows/fakedroid-odt.yml
2022-10-28 17:52:27 +02:00

45 lines
1.3 KiB
YAML

name: Run on-device-tests with fakedroid
on:
pull_request:
push:
jobs:
fakedroid-odt:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-22.05
- name: Setup cachix
uses: cachix/cachix-action@v10
with:
name: nix-on-droid
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: Build fakedroid script
run: |
nix \
--log-format bar-with-logs \
--option keep-going true \
--show-trace \
build .#fakedroid \
--impure \
--out-link fakedroid
- name: Initialize fakedroid
run: ./fakedroid echo INIT
- name: Run tests
run: |
./fakedroid mkdir -p .cache/nix-on-droid-self-test
./fakedroid touch .cache/nix-on-droid-self-test/confirmation-granted
./fakedroid nix-on-droid on-device-test
- name: Push to cachix
if: always() && github.event_name != 'pull_request'
run: ./fakedroid nix-shell -p cachix --run 'nix --extra-experimental-features nix-command path-info --all | cachix push nix-on-droid'