-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 2.15 KB
/
ci.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
68
69
70
71
72
73
74
75
76
77
name: CI
on: [ push ]
jobs:
test:
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Set up basic system
run: |
echo "::group::Update system"
pacman -Syu --noconfirm
echo "::endgroup::"
echo "::group::Install basic packages"
pacman -S --noconfirm --needed git base-devel
echo "::endgroup::"
echo "::group::Add non-privileged user to run makepkg"
useradd -m build
echo "build ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
echo "::endgroup::"
- name: Install dependencies for mommy
run: |
echo "::group::Install man-db"
pacman -S --noconfirm man-db
sed -i "/NoExtract.*man/d" /etc/pacman.conf # Extract man pages
echo "::endgroup::"
echo "::group::Install ShellSpec"
git clone https://aur.archlinux.org/shellspec-bin.git
chown -R build:build ./shellspec-bin
cd ./shellspec-bin
sudo -u build makepkg -si --noconfirm
cd -
echo "::endgroup::"
echo "::group::Install additional shells"
pacman -S --noconfirm fish zsh
echo "::endgroup::"
- name: Checkout mommy
uses: actions/checkout@v3
with:
repository: FWDekker/mommy
path: mommy
ref: dev
- name: Fix mommy directory ownership
run: chown -R build:build ./mommy/
- name: Checkout aur-mommy
uses: actions/checkout@v3
with:
path: aur-mommy
- name: Fix aur-mommy directory ownership
run: chown -R build:build ./aur-mommy/
- name: Test AUR package
run: |
cd ./aur-mommy/
echo "::group::Patch"
sudo -u build ./update.sh dev
echo "::endgroup::"
echo "::group::Build and install"
sudo -u build makepkg -si --noconfirm
echo "::endgroup::"
cd ../mommy/
echo "::group::Test"
make system=1 test
echo "::endgroup::"
echo "::group::Uninstall"
pacman -R --noconfirm mommy
echo "::endgroup::"