diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b0ca175..4c663ad 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -17,6 +17,7 @@ jobs: - name: Checkout prepare script uses: actions/checkout@v4 with: + fetch-depth: 1 sparse-checkout: prepare.sh sparse-checkout-cone-mode: false @@ -34,3 +35,29 @@ jobs: - name: Check README.md run: tools/is-clean --make --root=doc README.md + + test: + needs: build + continue-on-error: true + strategy: + matrix: + kind: [ "system", "user" ] + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Prepare build environment + run: ./prepare.sh -us | tee -a "$GITHUB_ENV" + + - name: Install + run: | + if [ "${{ matrix.kind }}" = "user" ]; then + ./install.sh -u + elif [ "${{ matrix.kind }}" = "system" ]; then + sudo ./install.sh -s + else + exit 1 + fi diff --git a/prepare.sh b/prepare.sh index 237b806..ef99a6f 100755 --- a/prepare.sh +++ b/prepare.sh @@ -18,7 +18,7 @@ done shift $((OPTIND-1)) if [ -z "$DISTRO" ]; then - if command -v lsb_release; then + if command -v lsb_release >/dev/null; then DISTRO=$(lsb_release -is) elif command -v pacman >/dev/null; then DISTRO="Arch"