Skip to content

Commit c136561

Browse files
authored
Merge pull request #33 from 2m/fix/tests-2m
Validate using remote pkgbuild repositories
2 parents e3bf6a9 + d208ecc commit c136561

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,47 @@ jobs:
1212
runs-on: ubuntu-latest
1313
name: Validate a Pull Request
1414
steps:
15-
- uses: actions/checkout@v2.3.4
15+
- uses: actions/checkout@v2
1616

1717
- name: Run yamllint
1818
uses: ibiqlik/[email protected]
1919

2020
- name: Run ShellCheck
2121
uses: ludeeus/action-shellcheck@master
22+
23+
test:
24+
runs-on: ubuntu-latest
25+
name: Test on project
26+
27+
strategy:
28+
matrix:
29+
include:
30+
- repo-owner: 2m
31+
repo-name: ucm-bin-pkgbuild
32+
pkg-name: ucm-bin
33+
- repo-owner: 2m
34+
repo-name: paru-pkgbuild
35+
pkg-name: .
36+
fail-fast: false
37+
38+
steps:
39+
- uses: actions/checkout@v2
40+
with:
41+
path: action
42+
43+
- uses: actions/checkout@v2
44+
with:
45+
repository: ${{ matrix.repo-owner }}/${{ matrix.repo-name }}
46+
path: ${{ matrix.repo-name }}
47+
48+
- name: srcinfo
49+
uses: ./action
50+
with:
51+
target: srcinfo
52+
pkgname: ${{ matrix.repo-name }}/${{ matrix.pkg-name }}
53+
54+
- name: pkgbuild
55+
uses: ./action
56+
with:
57+
target: pkgbuild
58+
pkgname: ${{ matrix.repo-name }}/${{ matrix.pkg-name }}

entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pkgname="$(basename "$pkgbuild_dir")" # keep quotes in case someone passes in a
4949
install_deps() {
5050
# install make and regular package dependencies
5151
grep -E 'depends|makedepends' PKGBUILD | \
52+
grep -v optdepends | \
5253
sed -e 's/.*depends=//' -e 's/ /\n/g' | \
5354
tr -d "'" | tr -d "(" | tr -d ")" | \
5455
xargs yay -S --noconfirm
@@ -73,7 +74,7 @@ case $target in
7374
eval "$command"
7475
;;
7576
srcinfo)
76-
makepkg --printsrcinfo | diff .SRCINFO - || \
77+
makepkg --printsrcinfo | diff --ignore-blank-lines .SRCINFO - || \
7778
{ echo ".SRCINFO is out of sync. Please run 'makepkg --printsrcinfo' and commit the changes."; false; }
7879
;;
7980
*)

0 commit comments

Comments
 (0)