-
-
Notifications
You must be signed in to change notification settings - Fork 572
38 lines (37 loc) · 1.14 KB
/
tests.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Package
run: |
CHANGED_FILES=($(git diff --name-only --diff-filter=d $THE_LAST_COMMIT HEAD))
for FILE in $CHANGED_FILES; do
if [[ $(basename $FILE) == "PKGBUILD" ]]; then
docker build -t builder -f travis/Dockerfile $(dirname $FILE)
docker run --rm builder
fi
done
pkgcheck:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pkgcheck-arch --user
- name: Check Styling
run: |
COMMIT_RANGE=($(git diff --name-only --diff-filter=d $(git log -2 --format=%H | tr '\n' ' ')))
CHANGED_FILES=($(git diff --name-only $COMMIT_RANGE))
for FILE in $CHANGED_FILES; do
if [[ $(basename $FILE) == "PKGBUILD" ]]; then
pkgcheck $FILE
fi
done