-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.25 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
name: ci
on:
push:
branches: ['**']
paths-ignore:
- "*.md"
pull_request:
branches: [main]
paths:
- "action.yml"
- "pkgruft-action"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout shared testdata
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: pkgcraft/pkgcraft-testdata
path: testdata
- name: Run against repo with invalid ebuilds
env:
_PKGCRUFT_ACTION_EXIT_STATUS: 2
uses: ./
with:
repo: testdata/repos/valid/bad
- name: Run against qa-primary repo
env:
_PKGCRUFT_ACTION_EXIT_STATUS: 0
uses: ./
with:
repo: testdata/repos/valid/qa-primary
- name: Patch qa-primary repo
working-directory: testdata/repos/valid/qa-primary
run: |
for file in $(find -name '*.patch'); do
dir=${file%/*}
patch=${file##*/}
pushd "${dir}" > /dev/null
patch -p1 -F0 < "${patch}"
popd > /dev/null
done
- name: Run against patched qa-primary repo
env:
_PKGCRUFT_ACTION_EXIT_STATUS: 0
uses: ./
with:
repo: testdata/repos/valid/qa-primary