-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (63 loc) · 2.45 KB
/
pop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# TODO - move to containers.yml
name: Pop_OS - iniPC script - OUTDATED
# TODO try using platform matrix and a single file for Ubuntu and Debian
# TODO - set trigger paths, remove unnecessary commands, unify with Ubuntu script
# TODO test
# TODO fix PopOS init script itself...
# TODO standardize workflow names
on:
push:
branches: [ "devel", "testing", "stable", "minimal" ]
paths:
- 'run_init.sh'
- 'prelude.sh'
- 'CommonInitScripts/*.sh*'
- '.github/workflows/pop.yml'
- 'WSL_Ubuntu_22.04/*.sh'
- 'PopOS_22.04/*.sh'
pull_request:
branches: [ "devel", "testing", "stable", "minimal" ]
paths:
- 'run_init.sh'
- 'prelude.sh'
- 'CommonInitScripts/*.sh*'
- '.github/workflows/pop.yml'
- 'WSL_Ubuntu_22.04/*.sh'
- 'PopOS_22.04/*.sh'
# TODO try caching the PopOS container
# see: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
jobs:
build:
runs-on: ubuntu-22.04
container: "nycticoracs/pop_os:22.04"
steps:
# - name: "set APT to non-interactive"
# shell: bash
# run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections"
- name: "Update APT"
run: "apt-get update -y"
- name: "Install git"
run: "apt-get install -y git sudo"
- name: "checkout repo"
uses: actions/checkout@v4
- name: print `github.ref=${{ github.ref }}`
run: echo ${{ github.ref }}
- name: print `github.sha=${{ github.sha }}`
run: echo ${{ github.sha }}
- name: Running iniPC script for the 1st time should not fail.
run: ./run_init.sh --noninteractive
- name: save ~/ for idempotency test
run: cp -r ~/ /tmp/old_home/
- name: Running iniPC script for the 2nd time should not fail.
run: ./run_init.sh --noninteractive
# TODO split this command to multiple lines
# TODO also test that the first run of initPC script does change the state of home dir
# TODO - test whether the test works as expected
- name: The initPC script should be idempotent on ~/ directory (WIP - needs testing)
run: |
cd ~
pwd
find . -type f \( ! -iname "*.log" ! -path "*/.dotfiles/logs/HEAD" \
! -path "*work/_temp/*" ! -path "./runners/*" \
! -name ".wget-hsts" \) -print0 |
xargs -0 -I{} bash -c 'if ! diff "$1" "/tmp/old_home/$1"; then echo "diff failed for: $1"; exit 1; fi' bash {}