Merge pull request #11 from tomeon/nix-flake-darwin-fix #21
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 kodi-ansible-role tests | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
jobs: | |
native: | |
name: Run test playbook | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
image: | |
- alpine:3 | |
- archlinux/archlinux | |
- debian:11 | |
- debian:12 | |
- ubuntu:22.04 | |
# XXX addon installation is currently broken in Ubuntu 23.04 due to | |
# issues upstream of this role. Omit from the workflow for now. | |
#- ubuntu:23.04 | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install testing dependencies | |
run: | | |
{ apk add --no-cache ansible sudo ; } || : | |
{ | |
echo 'tzdata tzdata/Areas select Europe' | debconf-set-selections \ | |
&& echo 'tzdata tzdata/Zones/Europe select Bratislava' | debconf-set-selections \ | |
&& apt -y update \ | |
&& apt -y install --no-install-recommends ansible sudo | |
} || : | |
{ pacman --noconfirm -Sy archlinux-keyring && pacman --noconfirm -Su && pacman --noconfirm -S ansible sudo ; } || : | |
- name: Run test playbook | |
# Force `kodi_service_enabled` to `false`, as we can't count on being | |
# able to use the distribution's service manager/supervisor (e.g. | |
# OpenRC under Alpine Linux) in a container. | |
run: | | |
ansible-playbook -vv --become -c local -i localhost, -e kodi_service_enabled=false ./tests/test.yml | |
nix: | |
name: Run Nix actions | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v8 | |
- name: Set up Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@v3 | |
- name: Run Nix flake checks | |
run: | | |
nix flake check -L |