Run on-device-tests with fakedroid #482
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run on-device-tests with fakedroid | |
on: | |
pull_request: | |
push: | |
schedule: | |
- cron: 0 0 * * 1 | |
jobs: | |
fakedroid-odt-channel: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install nix | |
uses: cachix/install-nix-action@v20 | |
- name: Setup cachix | |
uses: cachix/cachix-action@v12 | |
with: | |
name: nix-on-droid | |
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" | |
- name: Initialize fakedroid for channel setup | |
run: nix run --impure .#fakedroid -- echo INIT | |
- name: Run tests | |
run: | | |
nix run --impure .#fakedroid -- mkdir -p .cache/nix-on-droid-self-test | |
nix run --impure .#fakedroid -- touch .cache/nix-on-droid-self-test/confirmation-granted | |
nix run --impure .#fakedroid -- nix-on-droid on-device-test | |
- name: Push to cachix | |
if: always() && github.event_name != 'pull_request' | |
run: nix run --impure .#fakedroid -- nix-shell -p cachix --run 'nix --extra-experimental-features nix-command path-info --all | cachix push nix-on-droid' | |
fakedroid-flakes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install nix | |
uses: cachix/install-nix-action@v20 | |
- name: Setup cachix | |
uses: cachix/cachix-action@v12 | |
with: | |
name: nix-on-droid | |
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" | |
- name: Initialize fakedroid for flake setup | |
run: USE_FLAKE=1 nix run --impure .#fakedroid -- echo INIT | |
- name: Push to cachix | |
if: always() && github.event_name != 'pull_request' | |
run: nix run --impure .#fakedroid -- nix-shell -p cachix --run 'nix --extra-experimental-features nix-command path-info --all | cachix push nix-on-droid' |