Add job for profile installation #48
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
setup: | |
runs-on: ubuntu-24.04 | |
outputs: | |
cache-apt-lists-hit: ${{ steps.cache-apt-lists.outputs.cache-hit }} | |
cache-apt-archives-hit: ${{ steps.cache-apt-archives.outputs.cache-hit }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Cache apt lists | |
id: cache-apt-lists | |
uses: actions/cache@v3 | |
with: | |
path: /var/lib/apt/lists | |
key: ${{ runner.os }}-apt-lists-${{ hashFiles('.github/workflows/apt-packages.txt') }} | |
restore-keys: | | |
${{ runner.os }}-apt-lists- | |
- name: Cache apt archives | |
id: cache-apt-archives | |
uses: actions/cache@v3 | |
with: | |
path: /var/cache/apt/archives | |
key: ${{ runner.os }}-apt-archives-${{ hashFiles('.github/workflows/apt-packages.txt') }} | |
restore-keys: | | |
${{ runner.os }}-apt-archives- | |
exclude: | | |
/var/cache/apt/archives/lock | |
/var/cache/apt/archives/partial | |
- name: Set up environment | |
run: | | |
echo "Cache hit for apt lists: ${{ steps.cache-apt-lists.outputs.cache-hit }}" | |
echo "Cache hit for apt archives: ${{ steps.cache-apt-archives.outputs.cache-hit }}" | |
if [ "${{ steps.cache-apt-lists.outputs.cache-hit }}" != 'true' ] || \ | |
[ "${{ steps.cache-apt-archives.outputs.cache-hit }}" != 'true' ]; then | |
sudo apt-get update && sudo apt-get install -y $(cat .github/workflows/apt-packages.txt) | |
fi | |
echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/$USER | |
export DISPLAY=:99 | |
Xvfb :99 -screen 0 1024x768x24 & | |
export XDG_RUNTIME_DIR=/run/user/$(id -u) | |
sudo mkdir -p $XDG_RUNTIME_DIR | |
sudo chown $(whoami):$(whoami) $XDG_RUNTIME_DIR | |
chmod 700 $XDG_RUNTIME_DIR | |
- name: Restart snapd | |
run: sudo systemctl restart snapd | |
install-script: | |
runs-on: ubuntu-24.04 | |
needs: setup | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Run install-script tests | |
run: ./install-test | |
ubuntu-generic-profile: | |
runs-on: ubuntu-24.04 | |
needs: install-script | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Run ubuntu-generic-profile tests | |
run: ./install --profile ubuntu-generic |